Organize things. Structures and functions dealing with similar things are now grouped...
[util-vserver.git] / scripts / vserver.functions
index 47eca33..3139ac6 100644 (file)
@@ -103,7 +103,7 @@ function _generateChbindOptions
 
     getFileValue nid "$vdir/ncontext" "$vdir/context"
     
-    CHBIND_OPTS=( $SILENT_OPT ${nid:+--nid "$nid"} ${bcast:+--bcast "$bcast"} )
+    CHBIND_OPTS=( $SILENT_OPT --secure ${nid:+--nid "$nid"} ${bcast:+--bcast "$bcast"} )
 
     for i in "${INTERFACES[@]}"; do
        CHBIND_OPTS=( "${CHBIND_OPTS[@]}" --ip "$i" )
@@ -250,7 +250,7 @@ function _generateInitOptions
     CHCONTEXT_INIT_OPTS=()
 
 
-    test -n "$INITSTYLE" || \
+    test x"$INITSTYLE" = xrescue || \
       getFileValue INITSTYLE    "$cfgdir"/style
     getFileValue RUNLEVEL_START "$cfgdir"/runlevel
     getFileValue RUNLEVEL_START "$cfgdir"/runlevel.start
@@ -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"
@@ -1072,7 +1072,7 @@ WARNING: There is no cachedirectory configured for this vserver;
        panic $"\
 /proc/uptime can not be accessed. Usually, this is caused by
 procfs-security. Please read the FAQ for more details
-http://www.linux-vserver.org/index.php?page=Linux-Vserver+FAQ"
+http://linux-vserver.org/Proc-Security"
 }