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
32 # xxx todo - redirect all stdout, stderr to /var/log/vinit for user access
35 if [ ! -x $slicescript ] ; then
36 echo "vinit@$slicename: no executable $slicescript - ignored"
39 echo $"Starting $prog"
40 $slicescript start $slicename >& /var/log/vinit &
45 # the initial model came without a stop function; legacy ...
47 echo $"Stopping $prog "
53 if [ -f ${lockfile} ] ; then
54 echo "$prog seems to have run"
57 echo "$prog apparently hasn't run"
76 echo $"Usage: $0 {start|stop|status}"