#!/bin/bash # # /etc/init.d/xendomains # Wrapper to start / stop domains automatically when domain 0 boots / shuts down # # chkconfig: 345 99 00 # description: Helper to start / stop Xen domains. # # This script is a wrapper init helper for the real workload horse script. # It should work on LSB-compliant systems. # ### BEGIN INIT INFO # Provides: xendomains # Required-Start: $syslog $remote_fs xenstored xenconsoled # Should-Start: xend # Required-Stop: $syslog $remote_fs xenstored xenconsoled # Should-Stop: xend # Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Short-Description: Wrapper to start/stop secondary xen domains # Description: Wrapper for starting / stopping domains automatically # when domain 0 boots / shuts down on systems using init. # The $SBINDIR/xendomains helper is shared between init and # systemd systems. ### END INIT INFO . /etc/xen/scripts/hotplugpath.sh case "$1" in start) $SBINDIR/xendomains start ;; stop) $SBINDIR/xendomains stop ;; restart) $SBINDIR/xendomains restart ;; reload) $SBINDIR/xendomains reload ;; status) $SBINDIR/xendomains status ;; *) echo "Usage: $0 {start|stop|restart|reload|status}" exit 3 ;; esac exit $?