From: Daniel Hokka Zakrisson Date: Sat, 16 Sep 2006 14:21:00 +0000 (+0000) Subject: Make novlandev the default, but easily overridable for all guests. X-Git-Tag: release-0.30.211~36 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0ff6a1c514a1705967cc5aa784d564a7417301c;p=util-vserver.git Make novlandev the default, but easily overridable for all guests. git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2319 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/doc/configuration.xml b/doc/configuration.xml index 35d34aa..9556c6b 100644 --- a/doc/configuration.xml +++ b/doc/configuration.xml @@ -191,6 +191,15 @@ operation will fail. Most tools assume 'on' as the default value. + + + + +When this file exists, the steps which setup and destroy a VLAN +interface will be executed. + + + @@ -1128,6 +1137,20 @@ The fixed value of the current action (e.g. 'prepre-start', 'post-stop'...). The default scope of the network interfaces. + + +When this file exists, the steps which setup and destroy a VLAN +interface will be executed for all interfaces of this vserver. + + + + +When this file exists, the steps which setup and destroy a VLAN +interface will be skipped. This overrides the global +vlandev setting for +this vserver. + + @@ -1177,8 +1200,15 @@ created by the host or another vserver. When this file exists, the steps which setup and destroy a VLAN -interface will be skipped. This flag should be set when a VLAN -interface is used by multiple vservers or by the host. +interface will be skipped. This will override the global +vlandev and the per-guest +vlandev. + + + + +When this file exists, the steps which setup and destroy a VLAN +interface will be executed. diff --git a/scripts/vserver.functions b/scripts/vserver.functions index d57a783..752bd85 100644 --- a/scripts/vserver.functions +++ b/scripts/vserver.functions @@ -533,7 +533,11 @@ function _processSingleInterface echo -e $"VLAN device-name used, but vlan subsystem not enabled.\nTry to execute 'modprobe 8021q' before starting the vservers" >&2 return 1 } - test -f /proc/net/vlan -o -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" \) && { _addInterfaceCmd VCONFIG $vlan_info } fi