X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fvserver.functions;h=ba07f332c1978467deb81ee39a927245b5b05973;hb=08cf141b4557892740d357c523fe8ed74be39bcb;hp=6d254583f397cc3402a27efcc5803185f9755596;hpb=fff63d0d7b11df1c17e1285ef82745221e1bd188;p=util-vserver.git diff --git a/scripts/vserver.functions b/scripts/vserver.functions index 6d25458..ba07f33 100644 --- a/scripts/vserver.functions +++ b/scripts/vserver.functions @@ -554,20 +554,20 @@ function _processSingleInterface ## LEGACY ALERT test ! -e "$iface"/only_ip || break - local vlan_info - if vlan_info=$(_getVLANInfo "$dev"); then - test -d /proc/net/vlan || { - echo -e $"VLAN device-name used, but vlan subsystem not enabled.\nTry to execute 'modprobe 8021q' before starting the vservers" >&2 - return 1 - } - test -e "$iface/vlandev" \ - -o \( -e "$iface/../vlandev" -a ! -e "$iface/novlandev" \) \ - -o \( -e "$__CONFDIR/.defaults/interfaces/vlandev" \ - -a ! -e "$iface/novlandev" \ - -a ! -e "$iface/../novlandev" \) && { + test -e "$iface/vlandev" \ + -o \( -e "$iface/../vlandev" -a ! -e "$iface/novlandev" \) \ + -o \( -e "$__CONFDIR/.defaults/interfaces/vlandev" \ + -a ! -e "$iface/novlandev" \ + -a ! -e "$iface/../novlandev" \) && { + local vlan_info + if vlan_info=$(_getVLANInfo "$dev"); then + test -d /proc/net/vlan || { + echo -e $"VLAN device-name used, but vlan subsystem not enabled.\nTry to execute 'modprobe 8021q' before starting the vservers" >&2 + return 1 + } _addInterfaceCmd VCONFIG $vlan_info - } - fi + fi + } if ! test -e "$iface"/indirect; then _addInterfaceCmd IP_ADDR "$ip${prefix:+/$prefix}" broadcast ${bcast:-+} ${name:+label "$dev:$name"} dev "$dev" @@ -1168,6 +1168,8 @@ function _saveSingleDiskLimit $_VDLIMIT --xid $ctx "$directory" | \ $_GREP '_used=' > "$vdir/cache/dlimits/$cachename" + + $_VDLIMIT --xid $ctx --remove "$directory" }