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
27 # bash's &>> feature is broken in f8
29 [ -x $slicescript ] || return 0
30 echo $"Starting $prog"
31 $slicescript start $slicename >> /var/log/vinit 2>&1 &
37 [ -x $slicescript ] && $slicescript stop $slicename >> /var/log/vinit 2>&1 &
40 echo $"Stopping $prog "
46 [ -x $slicescript ] || return 0
47 echo $"Restarting $prog"
48 $slicescript restart $slicename >> /var/log/vinit 2>&1 &
53 if [ -f ${lockfile} ] ; then
54 echo "$prog seems to have run"
57 echo "$prog apparently hasn't run"
80 echo $"Usage: $0 {start|stop|restart|status}"