SOURCES: util-vserver-init.patch (NEW) - sanitize vserver stopping

baggins baggins at pld-linux.org
Fri Oct 21 20:06:08 CEST 2005


Author: baggins                      Date: Fri Oct 21 18:06:08 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- sanitize vserver stopping

---- Files affected:
SOURCES:
   util-vserver-init.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/util-vserver-init.patch
diff -u /dev/null SOURCES/util-vserver-init.patch:1.1
--- /dev/null	Fri Oct 21 20:06:08 2005
+++ SOURCES/util-vserver-init.patch	Fri Oct 21 20:06:03 2005
@@ -0,0 +1,56 @@
+--- util-vserver-0.30.208/scripts/vserver.functions~	2005-10-11 19:51:05.061289264 +0200
++++ util-vserver-0.30.208/scripts/vserver.functions	2005-10-20 23:13:31.825830032 +0200
+@@ -258,23 +258,24 @@
+ 	    
+ 	(xsysv)
+ 	    test -n "$RUNLEVEL_START" || RUNLEVEL_START=3
+-	    test -n "$RUNLEVEL_STOP"  || RUNLEVEL_STOP=6
++	    test -n "$RUNLEVEL_STOP"  || RUNLEVEL_STOP=0
+ 
+ 	    for i in /etc/init.d/rc /etc/rc.d/rc; do
+ 		test -x "$vdir/vdir/$i" || continue
+ 		INITCMD_START=( "$i" "$RUNLEVEL_START" )
+ 		INITCMD_STOP=(  "$i" "$RUNLEVEL_STOP"  )
+ 	    done
+-	    INITCMD_PREPARE=( $_FAKE_RUNLEVEL "$RUNLEVEL_START" /var/run/utmp )
++	    INITCMD_PREPARE=( $_FAKE_RUNLEVEL "$RUNLEVEL_START" /var/run/utmpx )
+ 	    ;;
+ 	    
+ 	(xplain)
++	    test -n "$RUNLEVEL_STOP"  || RUNLEVEL_STOP=0
++
+ 	    INITCMD_START=( /sbin/init )
+-	    INITCMD_STOP=(  /sbin/init )
++	    INITCMD_STOP=(  /sbin/init "$RUNLEVEL_STOP" )
+ 	    _IS_FAKEINIT=1
+ 	    _NEED_VSHELPER_SYNC=1
+ 	    test -z "$RUNLEVEL_START" || INITCMD_START=( "${INITCMD_START[@]}" "$RUNLEVEL_START" )
+-	    test -z "$RUNLEVEL_STOP"  || INITCMD_STOP=(  "${INITCMD_STOP[@]}"  "$RUNLEVEL_STOP"  )
+ 	    ;;
+ 	    
+ 	(xminit)
+--- util-vserver-0.30.208/scripts/vserver.stop~	2005-10-21 13:09:59.242572600 +0200
++++ util-vserver-0.30.208/scripts/vserver.stop	2005-10-21 13:10:23.432895112 +0200
+@@ -64,16 +64,16 @@
+ 
+ fail=
+ initWait	   "$VSERVER_DIR" "$S_CONTEXT" vwait_statdir
+-if test -n "$_IS_FAKEINIT" && \
+-   $_VSERVER_INFO - FEATURE vkill; then
+-    $_VKILL -s INT --xid "$S_CONTEXT" -- 1 || fail=1
+-    ## HACK: remove the 'initpid' stuff above when PID virtualization
+-    ## is implemented
+-elif $_VSERVER_INFO - FEATURE migrate; then
++if $_VSERVER_INFO - FEATURE migrate; then
+     "${NICE_CMD[@]}" \
+     ${USE_VNAMESPACE:+$_VNAMESPACE --enter "$S_CONTEXT" -- } \
+     $_VCONTEXT $SILENT_OPT --migrate --chroot --xid "$S_CONTEXT" -- \
+     "${INITCMD_STOP[@]}" || fail=1
++elif test -n "$_IS_FAKEINIT" && \
++   $_VSERVER_INFO - FEATURE vkill; then
++    $_VKILL -s INT --xid "$S_CONTEXT" -- 1 || fail=1
++    ## HACK: remove the 'initpid' stuff above when PID virtualization
++    ## is implemented
+ else
+     "${NICE_CMD[@]}" \
+     "$_CHBIND"       "${CHBIND_OPTS[@]}" \
================================================================



More information about the pld-cvs-commit mailing list