X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fvshelper;h=0b44e22e13dbfcc5a9a4d2debae4a891037acd89;hb=95e2774070e989fe9cf9f48dae5fa054e55e2a3e;hp=b9dfdf9c129693a38071931c3bc76717d286ee11;hpb=3b34449070c0846fdc49436d1edd5916512f1644;p=util-vserver.git diff --git a/scripts/vshelper b/scripts/vshelper index b9dfdf9..0b44e22 100755 --- a/scripts/vshelper +++ b/scripts/vshelper @@ -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" || {