X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fvserver.functions;h=3139ac6cfef22d74ae4870e3de1385ba43427bdc;hb=cc5ad98291c08205769be09fb188c742ba5135b3;hp=6d254583f397cc3402a27efcc5803185f9755596;hpb=aff4398a22495dbe9e926f547e4e9570a92184f9;p=util-vserver.git diff --git a/scripts/vserver.functions b/scripts/vserver.functions index 6d25458..3139ac6 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"