sync to 0.30.213
[util-vserver.git] / scripts / vshelper
index b9dfdf9..0b44e22 100755 (executable)
@@ -73,12 +73,17 @@ function doInternalMethod
 
                    disown %%
                    vshelper.waitForStopSync "$sync_dir"
+                   spawn killContext "$XID"
                    ;;
                (swsusp)
                    ## TODO: any senseful action here? Perhaps shutdown scheduler for it?
                    exit 0
                    ;;
                (restart2)      ;;
+               (shutdown)
+                   logging $"Cleaning up after vserver '$VSERVER'"
+                   spawn $_VSERVER --defaulttty "$VSERVER" stop
+                   ;;
                (*)
                    warning $"Unknown action '$ACTION' for vserver '$VSERVER'"
                    exit 1
@@ -177,7 +182,7 @@ while true; do
     responsible_xid=$pxid
 done
 
-vserver_id=$($_VSERVER_INFO "$responsible_xid" ID) ||
+vserver_id=$($_VSERVER_INFO "$responsible_xid" ID) || test "$ACTION" = "shutdown" ||
     panic $"No responsible vserver found for xid '$responsible_xid' ($XID); aborting..."
     
 test "$XID" = "$responsible_xid" || {