diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-01-07 15:02:05 -0200 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-01-07 15:02:05 -0200 |
commit | c3173338df6eecc9dc6bf780cbfe7ab57e5d46b7 (patch) | |
tree | 6e1976eadea766349a14d195fbd7aceca2a364ac /kernels/xen/xendomains.patch | |
parent | 8ed713ab896f4eff72c669c4d27986b6d99d2004 (diff) | |
download | abslibre-c3173338df6eecc9dc6bf780cbfe7ab57e5d46b7.tar.gz abslibre-c3173338df6eecc9dc6bf780cbfe7ab57e5d46b7.tar.bz2 abslibre-c3173338df6eecc9dc6bf780cbfe7ab57e5d46b7.zip |
xen-4.3.1-2: updating version
Diffstat (limited to 'kernels/xen/xendomains.patch')
-rw-r--r-- | kernels/xen/xendomains.patch | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/kernels/xen/xendomains.patch b/kernels/xen/xendomains.patch new file mode 100644 index 000000000..16f62b65a --- /dev/null +++ b/kernels/xen/xendomains.patch @@ -0,0 +1,108 @@ +--- xen-4.3.1.orig/tools/hotplug/Linux/init.d/xendomains 2013-07-19 14:52:52.159013757 -0500 ++++ xen-4.3.1/tools/hotplug/Linux/init.d/xendomains 2013-07-19 14:56:00.079145322 -0500 +@@ -51,17 +51,13 @@ + fi + + # See docs/misc/distro_mapping.txt +-if [ -d /var/lock/subsys ]; then +- LOCKFILE=/var/lock/subsys/xendomains ++if [ -d /run/lock/subsys ]; then ++ LOCKFILE=/run/lock/subsys/xendomains + else +- LOCKFILE=/var/lock/xendomains ++ LOCKFILE=/run/lock/xendomains + fi + +-if [ -d /etc/sysconfig ]; then +- XENDOM_CONFIG=/etc/sysconfig/xendomains +-else +- XENDOM_CONFIG=/etc/default/xendomains +-fi ++XENDOM_CONFIG=/etc/conf.d/xendomains + + test -r $XENDOM_CONFIG || { echo "$XENDOM_CONFIG not existing"; + if [ "$1" = "stop" ]; then exit 0; +@@ -185,8 +181,13 @@ + # read name from xen config file + rdname() + { +- NM=$($CMD create --quiet --dryrun --defconfig "$1" | +- sed -n 's/^.*(name \(.*\))$/\1/p') ++ if [ "$CMD" == "xm" ]; then ++ NM=$($CMD create --quiet --dryrun --defconfig "$1" | ++ sed -n 's/^.*(name \(.*\))$/\1/p') ++ else ++ NM=$($CMD create --quiet --dryrun --defconfig "$1" | ++ perl -pe 's|^.*"name":"(.*?)".*$|$1|') ++ fi + } + + rdnames() +@@ -229,15 +230,15 @@ + rdname $1 + RC=1 + name=;id= +- while read LN; do +- parseln "$LN" || continue ++ while read id; do + if test $id = 0; then continue; fi ++ name=`xenstore-read /local/domain/$id/name` + case $name in + ($NM) + RC=0 + ;; + esac +- done < <($CMD list -l | grep "$LIST_GREP") ++ done < <(xenstore-list /local/domain) + return $RC + } + +@@ -312,6 +313,8 @@ + + all_zombies() + { ++ return 0 ++ + name=;id= + while read LN; do + parseln "$LN" || continue +@@ -363,9 +366,9 @@ + fi + echo -n "Shutting down Xen domains:" + name=;id= +- while read LN; do +- parseln "$LN" || continue ++ while read id; do + if test $id = 0; then continue; fi ++ name=`xenstore-read /local/domain/$id/name` + echo -n " $name" + if test "$XENDOMAINS_AUTO_ONLY" = "true"; then + eval " +@@ -450,7 +453,7 @@ + fi + kill $WDOG_PID >/dev/null 2>&1 + fi +- done < <($CMD list -l | grep "$LIST_GREP") ++ done < <(xenstore-list /local/domain) + + # NB. this shuts down ALL Xen domains (politely), not just the ones in + # AUTODIR/* +@@ -479,15 +482,15 @@ + check_domain_up() + { + name=;id= +- while read LN; do +- parseln "$LN" || continue ++ while read id; do + if test $id = 0; then continue; fi ++ name=`xenstore-read /local/domain/$id/name` + case $name in + ($1) + return 0 + ;; + esac +- done < <($CMD list -l | grep "$LIST_GREP") ++ done < <(xenstore-list /local/domain) + return 1 + } + |