aboutsummaryrefslogtreecommitdiffstats
path: root/tools/hotplug
diff options
context:
space:
mode:
authorIan Jackson <Ian.Jackson@eu.citrix.com>2010-12-22 17:48:31 +0000
committerIan Jackson <Ian.Jackson@eu.citrix.com>2010-12-22 17:48:31 +0000
commit01fcfa3b96b9958cf9376b68d547b5a5ffe42219 (patch)
treee153b3b4949e1019550a4b16aa950981011f7208 /tools/hotplug
parentb4692a3899d090409a2c53c917cfdd94efdd4e50 (diff)
downloadxen-01fcfa3b96b9958cf9376b68d547b5a5ffe42219.tar.gz
xen-01fcfa3b96b9958cf9376b68d547b5a5ffe42219.tar.bz2
xen-01fcfa3b96b9958cf9376b68d547b5a5ffe42219.zip
tools/hotplug: read /etc/default/xencommons if appropriate
Since 22187:c41252a55a0a we have been installing our example xencommons settings file in either /etc/sysconfig or /etc/default, depending on whether /etc/sysconfig exists. However I omitted to add the code to /etc/init.d/xencommons to actually read either version of the file, although every other init script seems to have it. An effect of this misplaced/unread file is that the automatic tests don't cause xenconsoled to collect serial logs, because the tester edits whichever file actually exists. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/hotplug')
-rw-r--r--tools/hotplug/Linux/init.d/xencommons8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/hotplug/Linux/init.d/xencommons b/tools/hotplug/Linux/init.d/xencommons
index 40b7cbe94b..873f6884e8 100644
--- a/tools/hotplug/Linux/init.d/xencommons
+++ b/tools/hotplug/Linux/init.d/xencommons
@@ -18,7 +18,13 @@
# Description: Starts and stops the daemons neeeded for xl/xend
### END INIT INFO
-test -f /etc/sysconfig/xencommons && . /etc/sysconfig/xencommons
+if [ -d /etc/sysconfig ]; then
+ xencommons_config=/etc/sysconfig
+else
+ xencommons_config=/etc/default
+fi
+
+test -f $xencommons_config/xencommons && . $xencommons_config/xencommons
XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid
shopt -s extglob