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
20 slicescript=/etc/rc.d/init.d/vinit.slice
21 basename=$(basename $slicescript)
22 slicename=$(cat /etc/slicename)
24 prog="Slice initscript ${basename}@${slicename}"
25 lockfile=/var/lock/subsys/vinit
29 # bash's &>> feature is broken in f8
31 [ -x $slicescript ] || return 0
32 echo $"Starting $prog"
33 $slicescript start $slicename >> /var/log/vinit 2>&1 &
39 [ -x $slicescript ] && $slicescript stop $slicename >> /var/log/vinit 2>&1 &
42 echo $"Stopping $prog "
48 [ -x $slicescript ] || return 0
49 echo $"Restarting $prog"
50 $slicescript restart $slicename >> /var/log/vinit 2>&1 &
55 if [ -f ${lockfile} ] ; then
56 echo "$prog seems to have run"
59 echo "$prog apparently hasn't run"
82 echo $"Usage: $0 {start|stop|restart|status}"