6 # vinit - trigger the slice-local initscript as installed in /etc/rc.d/vinit.slice
8 # this is unconditionnally installed and activated in the sliver
9 # but of course nothing is run if the script is not present
11 # note - for practical reasons this is *not* activated through chkconfig
12 # as the slice has not yet started at that point
15 # historically planetlab initscripts have not been required to handle the 'stop' method
16 # so installing such a script directly as /etc/rc.d/vinit would result in the
17 # script .. being run a second time at vserver-stop time
20 # Source function library.
21 . /etc/init.d/functions
23 slicescript=/etc/rc.d/init.d/vinit.slice
24 basename=$(basename $slicescript)
25 slicename=$(cat /etc/slicename)
27 prog="Slice initscript ${basename}@${slicename}"
28 lockfile=/var/lock/subsys/vinit
33 if [ ! -x $slicescript ] ; then
34 echo "vinit@$slicename: no executable $slicescript - ignored"
37 echo $"Starting $prog"
38 $slicescript start $slicename >& /var/log/vinit &
43 # the initial model came without a stop function; legacy ...
45 echo $"(Dummy) Stopping $prog "
50 if [ -f ${lockfile} ] ; then
51 echo "$prog seems to have run"
54 echo "$prog apparently hasn't run"
73 echo $"Usage: $0 {start|stop|status}"