X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fvshelper;h=0b44e22e13dbfcc5a9a4d2debae4a891037acd89;hb=b0a62d195efca12c5cb9e7c0b3bea3be2cd57fc9;hp=b9dfdf9c129693a38071931c3bc76717d286ee11;hpb=fc28db1eb4146796ec27c2fb15780d6303120261;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" || {