From: Ian Jackson Subject: [PATCH] tools/hotplug: read /etc/default/xencommons if appropriate Date: Wed, 22 Dec 2010 12:41:38 +0000 Message-ID: <19729.61954.246484.776632@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Since 22187 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 diff -r 2f4b4521ff73 tools/hotplug/Linux/init.d/xencommons --- a/tools/hotplug/Linux/init.d/xencommons Tue Dec 21 18:10:46 2010 +0000 +++ b/tools/hotplug/Linux/init.d/xencommons Wed Dec 22 12:32:49 2010 +0000 @@ -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