3 # vinit - trigger the slice-local initscript as installed in /etc/rc.d/vinit.slice
5 # this is unconditionnally installed and activated in the sliver
6 # but of course nothing is run if the script is not present
8 # note - for practical reasons this is *not* activated through chkconfig
9 # as the slice has not yet started at that point
12 # historically planetlab initscripts were not required to handle the 'stop' and 'restart' method
13 # as of March 2011 this becomes a requirement though
15 # Source function library.
16 . /etc/init.d/functions
18 slicescript=/etc/rc.d/init.d/vinit.slice
19 basename=$(basename $slicescript)
20 slicename=$(cat /etc/slicename)
22 prog="Slice initscript ${basename}@${slicename}"
23 lockfile=/var/lock/subsys/vinit
28 [ -x $slicescript ] || return 0
29 echo $"Starting $prog"
30 $slicescript start $slicename >> /var/log/vinit 2>&1 &
36 [ -x $slicescript ] && $slicescript stop $slicename >> /var/log/vinit 2>&1 &
39 echo $"Stopping $prog "
45 [ -x $slicescript ] || return 0
46 echo $"Restarting $prog"
47 $slicescript restart $slicename >> /var/log/vinit 2>&1 &
52 if [ -f ${lockfile} ] ; then
53 echo "$prog seems to have run"
56 echo "$prog apparently hasn't run"
79 echo $"Usage: $0 {start|stop|restart|status}"