mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
Now the init script is called xencommons and, as the name suggests, it is a common script between xl and xend because it is used to start xenconsoled, xenstored and xenbackendd and the initialization of these three daemons has been removed from xend. The global xen_toolstack=xl/xend variable has been removed. Regarding the network setup, I made the vif scripts follow the same pattern as the other scripts in xen-backend: a new script called vif-setup is executed unconditionally. vif-setup is going to do the right thing depending on the value of the environmental variable "script" (same technique used before), defaulting to vif-bridge. In the common scenario the toolstack doesn't need to set the variable "script" because vif-bridge is going to be called anyway. There is no global network script to setup the network bridges with xl, so if you are using xl without xend, you need to manually configure the bridges using your distro network setup, or, if you are lazy, you can just add something like: /etc/xen/scripts/network-bridge start to your rc.local. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
68 lines
1.2 KiB
Bash
Executable File
68 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# xend Script to start and stop the Xen control daemon.
|
|
#
|
|
# Author: Keir Fraser <keir.fraser@cl.cam.ac.uk>
|
|
#
|
|
# chkconfig: 2345 98 01
|
|
# description: Starts and stops the Xen control daemon.
|
|
### BEGIN INIT INFO
|
|
# Provides: xend
|
|
# Required-Start: $syslog $remote_fs
|
|
# Should-Start:
|
|
# Required-Stop: $syslog $remote_fs
|
|
# Should-Stop:
|
|
# Default-Start: 3 4 5
|
|
# Default-Stop: 0 1 2 6
|
|
# Default-Enabled: yes
|
|
# Short-Description: Start/stop xend
|
|
# Description: Starts and stops the Xen control daemon.
|
|
### END INIT INFO
|
|
|
|
shopt -s extglob
|
|
|
|
# Wait for Xend to be up
|
|
function await_daemons_up
|
|
{
|
|
i=1
|
|
rets=10
|
|
xend status
|
|
while [ $? -ne 0 -a $i -lt $rets ]; do
|
|
sleep 1
|
|
echo -n .
|
|
i=$(($i + 1))
|
|
xend status
|
|
done
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
mkdir -p /var/lock/subsys
|
|
touch /var/lock/subsys/xend
|
|
xend start
|
|
await_daemons_up
|
|
;;
|
|
stop)
|
|
xend stop
|
|
rm -f /var/lock/subsys/xend
|
|
;;
|
|
status)
|
|
xend status
|
|
;;
|
|
reload)
|
|
xend reload
|
|
;;
|
|
restart|force-reload)
|
|
xend restart
|
|
await_daemons_up
|
|
;;
|
|
*)
|
|
# do not advertise unreasonable commands that there is no reason
|
|
# to use with this device
|
|
echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $?
|
|
|