mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
The xendomains script can be reused with systemd systems as it does not control services or sockets per se, but does a one shot scrape of domUs it needs start bring up, stop, reload so we're going to reuse it. This moves the core of the script to libexec and leaves only a helper on init. Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Jan Rękorajski <baggins@pld-linux.org> Cc: M A Young <m.a.young@durham.ac.uk> Cc: Jacek Konieczny <jajcus@jajcus.net> Cc: xen-devel@lists.xenproject.org Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
51 lines
1.3 KiB
Bash
51 lines
1.3 KiB
Bash
#!/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 $?
|