hotplug/Linux: honour XEN_LOG_DIR
authorWei Liu <wei.liu2@citrix.com>
Thu, 9 Jun 2016 12:57:39 +0000 (13:57 +0100)
committerWei Liu <wei.liu2@citrix.com>
Fri, 10 Jun 2016 09:52:16 +0000 (10:52 +0100)
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
tools/hotplug/Linux/init.d/sysconfig.xencommons.in
tools/hotplug/Linux/init.d/xencommons.in
tools/hotplug/Linux/xen-hotplug-common.sh.in

index acc730963a77dc9a5a1f594ba4f87e846cb0a0fb..c27a47688fc8f23dfff04fb8c9b0392caf4489ca 100644 (file)
@@ -24,7 +24,7 @@
 ## Default: ""
 #
 # Additional commandline arguments to start xenstored,
-# like "--trace-file /var/log/xen/xenstored-trace.log"
+# like "--trace-file @XEN_LOG_DIR@/xenstored-trace.log"
 # See "@sbindir@/xenstored --help" for possible options.
 XENSTORED_ARGS=
 
index eeac8ab74a4eb9c952b5f3194b187617bd98e1a2..7b69fc254dacffcdca35d2eaa53024ee25600040 100644 (file)
@@ -66,7 +66,7 @@ do_start () {
        then
                test -z "$XENSTORED_ROOTDIR" && XENSTORED_ROOTDIR="@XEN_LIB_STORED@"
                rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null
-               test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T /var/log/xen/xenstored-trace.log"
+               test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T @XEN_LOG_DIR@/xenstored-trace.log"
 
                if [ -n "$XENSTORED" ] ; then
                    echo -n Starting $XENSTORED...
index d5d0b698ea0a781a50eb98c32607d27a18f1f784..8c2cb9e25a1a401cf4dc366e2cdcb45eb59cf95a 100644 (file)
@@ -20,7 +20,7 @@ dir=$(dirname "$0")
 . "$dir/xen-script-common.sh"
 . "$dir/locking.sh"
 
-exec 2>>/var/log/xen/xen-hotplug.log
+exec 2>>@XEN_LOG_DIR@/xen-hotplug.log
 
 export PATH="${bindir}:${sbindir}:${LIBEXEC_BIN}:/sbin:/bin:/usr/bin:/usr/sbin:$PATH"
 export LD_LIBRARY_PATH="${libdir}${LD_LIBRARY_PATH+:}$LD_LIBRARY_PATH"