X-Git-Url: http://git.onelab.eu/?p=util-vserver.git;a=blobdiff_plain;f=scripts%2Fvshelper;h=9738ba8405b94a5e70c2bf88475dc33a6d88c03b;hp=b9dfdf9c129693a38071931c3bc76717d286ee11;hb=2822ba293eb308225c50d346930c47bf98d9927b;hpb=2894fc5a4c8335e4d7221311fed0556f33f8047c diff --git a/scripts/vshelper b/scripts/vshelper index b9dfdf9..9738ba8 100755 --- a/scripts/vshelper +++ b/scripts/vshelper @@ -54,25 +54,13 @@ function doInternalMethod case "$ACTION" in (restart) logging $"Restarting vserver '$VSERVER'" - - local sync_dir - vshelper.initStopSync sync_dir - - spawn $_VSERVER --defaulttty "$VSERVER" restart & - - disown %% - vshelper.waitForStopSync "$sync_dir" + spawn killContext "$XID" + execute $_VSERVER --defaulttty "$VSERVER" restart ;; (halt|poweroff) logging $"Stopping vserver '$VSERVER'" - - local sync_dir - vshelper.initStopSync sync_dir - - spawn $_VSERVER --defaulttty "$VSERVER" stop & - - disown %% - vshelper.waitForStopSync "$sync_dir" + spawn killContext "$XID" + execute $_VSERVER --defaulttty "$VSERVER" stop ;; (swsusp) ## TODO: any senseful action here? Perhaps shutdown scheduler for it?