No need to read the name again.
[util-vserver.git] / scripts / vserver.functions
index 1a73094..0997c2e 100644 (file)
@@ -346,6 +346,13 @@ function _generateInitOptions
            INITCMD_PREPARE=( $_FAKE_RUNLEVEL 3 /var/run/utmp )
            ;;
 
+       (xarch)
+           test -n "$RUNLEVEL_START" || RUNLEVEL_START=3
+           INITCMD_START=( /etc/rc.multi )
+           INITCMD_STOP=( /etc/rc.shutdown )
+           INITCMD_PREPARE=( $_FAKE_RUNLEVEL "$RUNLEVEL_START" /var/run/utmp )
+           ;;
+
        (x) ;;
        (*) panic "Unknown init-style '$INITSTYLE'; aborting";;
     esac
@@ -952,7 +959,7 @@ function mountVserver
         _namespaceCleanup "$cfgdir"
 
     isAvoidNamespace "$cfgdir" || \
-       $_SECURE_MOUNT --rbind -n "$vdir" "/"
+       $_SECURE_MOUNT --rbind -n -o dev "$vdir" "/"
 }
 
 function _umountVserverInternal
@@ -1454,7 +1461,7 @@ function _handleCgroup
     if test -r "$dir"/name; then
        read name < "$dir"/name
     else
-       read name < "$vdir"/name
+       name="$VSERVER_NAME"
     fi
 
     if test "$action" = "attach"; then