summaryrefslogtreecommitdiff
path: root/kernels/xen/xendomains.patch
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-01-08 03:41:42 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-01-08 03:41:42 +0000
commit3092fe0e20f490a5f9b8b9602ffc039a22be60c0 (patch)
treeca5296f2b482de6c3889b3d2721dda0ae342eaee /kernels/xen/xendomains.patch
parentbd5b8fe0fe2355ad0df744ed310d12b8a70c51f9 (diff)
Wed Jan 8 03:37:02 UTC 2014
Diffstat (limited to 'kernels/xen/xendomains.patch')
-rw-r--r--kernels/xen/xendomains.patch108
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
+ }
+