- bnc#783847 - Virtualization/xen: Bug Xen 4.2 'xendomins' init
script incorrectly Requires 'xend' service when using 'xl' toolstack init.xendomains OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=209
This commit is contained in:
committed by
Git OBS Bridge
parent
e28f3504fe
commit
75388748a2
@@ -7,10 +7,10 @@
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: xendomains
|
||||
# Required-Start: $syslog $remote_fs xend
|
||||
# Should-Start: iscsi o2cb ocfs2
|
||||
# Required-Stop: $syslog $remote_fs xend
|
||||
# Should-Stop: iscsi
|
||||
# Required-Start: $syslog $remote_fs xenstored xenconsoled
|
||||
# Should-Start: xend iscsi o2cb ocfs2
|
||||
# Required-Stop: $syslog $remote_fs xenstored xenconsoled
|
||||
# Should-Stop: xend iscsi
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Starts and stops Xen VMs
|
||||
@@ -21,11 +21,26 @@
|
||||
. /etc/rc.status
|
||||
rc_reset
|
||||
|
||||
LOCKFILE=/var/lock/subsys/xendomains
|
||||
XENDOM_CONFIG=/etc/sysconfig/xendomains
|
||||
RETCODE_FILE=/tmp/xendomains.rc.$$
|
||||
xm_cmd=echo
|
||||
|
||||
# See docs/misc/distro_mapping.txt
|
||||
if [ -d /var/lock/subsys ]; then
|
||||
LOCKFILE=/var/lock/subsys/xendomains
|
||||
else
|
||||
LOCKFILE=/var/lock/xendomains
|
||||
fi
|
||||
|
||||
if [ -d /etc/sysconfig ]; then
|
||||
XENDOM_CONFIG=/etc/sysconfig/xendomains
|
||||
else
|
||||
XENDOM_CONFIG=/etc/default/xendomains
|
||||
fi
|
||||
|
||||
test -r $XENDOM_CONFIG || { echo "$XENDOM_CONFIG not existing";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 6; fi; }
|
||||
|
||||
. "$XENDOM_CONFIG"
|
||||
|
||||
shopt -s dotglob nullglob
|
||||
@@ -59,13 +74,14 @@ check()
|
||||
XEND=`pidof -x /usr/sbin/xend`
|
||||
if [ -z "$XEND" ]; then
|
||||
xm_cmd="xl -f"
|
||||
XEND="xl"
|
||||
else
|
||||
xm_cmd="xm"
|
||||
fi
|
||||
if [ "$1" = status ]; then
|
||||
if [ ! -e /proc/xen/capabilities ] || [ ! -r "$XENDOM_CONFIG" ] || [ -z "$XEND" ]; then
|
||||
xendomains_abort 3
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [ `id -u` != 0 ]; then
|
||||
xendomains_abort 4
|
||||
|
Reference in New Issue
Block a user