- bnc#685338: Fix porting of xend-domain-lock.patch
- update scripts to use xl instead of xm: xen-updown.sh, init.xendomains, xmclone.sh - disable xend in openSuSE > 11.4 the xl command is the replacement for the xm command - mark runlevel scripts as config to preserve local changes by admin or dev during package update - enable xencommons runlevel script during upgrade if xend was already enabled - call /sbin/ldconfig directly in xen-libs post install scripts OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=110
This commit is contained in:
@@ -24,6 +24,7 @@ rc_reset
|
||||
LOCKFILE=/var/lock/subsys/xendomains
|
||||
XENDOM_CONFIG=/etc/sysconfig/xendomains
|
||||
RETCODE_FILE=/tmp/xendomains.rc.$$
|
||||
xm_cmd=xl
|
||||
|
||||
. "$XENDOM_CONFIG"
|
||||
|
||||
@@ -127,7 +128,7 @@ parseln()
|
||||
|
||||
xm_list()
|
||||
{
|
||||
TERM=vt100 xm list | grep -v '^Name *ID'
|
||||
TERM=vt100 ${xm_cmd} list | grep -v '^Name *ID'
|
||||
}
|
||||
|
||||
is_cfg_running()
|
||||
@@ -163,7 +164,7 @@ start()
|
||||
printed=1
|
||||
for dom in "$XENDOMAINS_SAVE"/*; do
|
||||
echo -n " ${dom##*/}: "
|
||||
xm restore "$dom" >/dev/null 2>&1
|
||||
${xm_cmd} restore "$dom" >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
rc_failed
|
||||
else
|
||||
@@ -184,9 +185,9 @@ start()
|
||||
rc_status -s
|
||||
else
|
||||
if grep -q "^name" "$dom";then
|
||||
xm create --quiet --defconfig "$dom"
|
||||
${xm_cmd} create --quiet --defconfig "$dom"
|
||||
elif grep -q "(name .*" "$dom";then
|
||||
xm create --quiet --config "$dom"
|
||||
${xm_cmd} create --quiet --config "$dom"
|
||||
fi
|
||||
if [ $? -ne 0 ]; then
|
||||
rc_failed
|
||||
@@ -224,19 +225,19 @@ any_non_zombies()
|
||||
|
||||
migrate_with_watchdog()
|
||||
{
|
||||
(xm migrate "$@" ; echo $? > "$RETCODE_FILE") >/dev/null 2>&1 &
|
||||
(${xm_cmd} migrate "$@" ; echo $? > "$RETCODE_FILE") >/dev/null 2>&1 &
|
||||
watchdog_xm $!
|
||||
}
|
||||
|
||||
save_with_watchdog()
|
||||
{
|
||||
(xm save "$@" ; echo $? > "$RETCODE_FILE") >/dev/null 2>&1 &
|
||||
(${xm_cmd} save "$@" ; echo $? > "$RETCODE_FILE") >/dev/null 2>&1 &
|
||||
watchdog_xm $!
|
||||
}
|
||||
|
||||
shutdown_with_watchdog()
|
||||
{
|
||||
(xm shutdown -w "$@" ; echo $? > "$RETCODE_FILE") >/dev/null 2>&1 &
|
||||
(${xm_cmd} shutdown -w "$@" ; echo $? > "$RETCODE_FILE") >/dev/null 2>&1 &
|
||||
watchdog_xm $!
|
||||
}
|
||||
|
||||
@@ -309,7 +310,7 @@ stop()
|
||||
for sysrq in $XENDOMAINS_SYSRQ; do
|
||||
echo -n " $name: "
|
||||
echo -n "sending sysrq '$sysrq'... "
|
||||
xm sysrq $id $sysrq
|
||||
${xm_cmd} sysrq $id $sysrq
|
||||
if [ $? -ne 0 ]; then
|
||||
rc_failed
|
||||
else
|
||||
@@ -323,7 +324,7 @@ stop()
|
||||
if is_zombie_state "$state"; then
|
||||
echo -n " $name: "
|
||||
echo -n "destroying zombie... "
|
||||
xm destroy $id
|
||||
${xm_cmd} destroy $id
|
||||
rc_reset
|
||||
rc_status -v
|
||||
continue
|
||||
|
Reference in New Issue
Block a user