From: Marcel de Riedmatten (mdr_at_dotforge.ch)
Date: Sat 23 Apr 2005 - 19:42:05 BST
Le ven 22/04/2005 à 19:29, Enrico Scholz a écrit :
> mdr_at_dotforge.ch (Marcel de Riedmatten) writes:
> Sorry; this is not supported yet. I plan to add a final script which
> shutdowns all 'unmarked' vservers but had not time to implement it. It
> will probably be solved by an '--unmarked' selector (similarly to
> '--all').
>
In the mean time i have found a cheap way to do it:
run the following script after "vserver-defaut stop"
#! /bin/bash
vsomething vserver --all -- stop
chcontext --xid 1 kill -2 -1
sleep 5
chcontext --xid 1 kill -9 -1
This has some drawback:
- the shutdown in not parallel
- special processes in context different from 1 are not killed
I am not afraid by the serial nature of the script because non "default"
marked vservers are of exceptionnal nature. For special processes
runninng in context other than 1 we could parse the output of
vserver-stat to get the context id of active context and loop over
chcontext --xid $XID kill -2 -1
sleep 5
chcontext --xid $XID kill -9 -1
but i am not sure if it would be all usefull.
-- Marcel de Riedmatten
_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver