cleanups; go into vserver-dir before *and* after executing scriptlets
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Wed, 22 Oct 2003 23:23:54 +0000 (23:23 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Wed, 22 Oct 2003 23:23:54 +0000 (23:23 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@294 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/scripts/vserver.start
util-vserver/scripts/vserver.stop
util-vserver/scripts/vserver.suexec

index 85dfcb9..94ea26f 100644 (file)
@@ -20,6 +20,7 @@ if isVserverRunning "$VSERVER_DIR"; then
     exit 1
 fi
 
+set +e
 generateOptions  "$VSERVER_DIR"
 execScriptlets   "$VSERVER_DIR" "$VSERVER_NAME" prepre-start
 enableInterfaces "$VSERVER_DIR"
@@ -27,10 +28,11 @@ enableInterfaces "$VSERVER_DIR"
 mountVserver "$VSERVER_DIR"
 prepareInit  "$VSERVER_DIR"
 
-cd "$VSERVER_DIR"/vdir/
 
+cd "$VSERVER_DIR"/vdir/
 execScriptlets   "$VSERVER_DIR" "$VSERVER_NAME" pre-start
 
+cd "$VSERVER_DIR"/vdir/
 "${NICE_CMD[@]}" \
     "$_CHBIND"       "${CHBIND_OPTS[@]}" \
     "$_EXEC_ULIMIT"  "$VSERVER_DIR/ulimits" \
index 3e1ca8c..31d112f 100644 (file)
@@ -25,6 +25,7 @@ fi
 generateOptions   "$VSERVER_DIR"
 
 set +e
+cd "$VSERVER_DIR"/vdir/
 execScriptlets    "$VSERVER_DIR" "$VSERVER_NAME" pre-stop
 
 cd "$VSERVER_DIR"/vdir/
index f031df7..85d92e0 100644 (file)
@@ -17,7 +17,7 @@
 
 
 isVserverRunning "$VSERVER_DIR" S_CONTEXT || :
-generateOptions   "$VSERVER_DIR"
+generateOptions  "$VSERVER_DIR"
 
 user=$1
 shift