From: Alain Spineux Date: Wed, 2 Dec 2020 15:17:54 +0000 (+0100) Subject: Fix #7113 Enable timestamp in tracefile for SD X-Git-Tag: Release-11.3.2~813 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e40b2a6ba9bf946b6e8f189e86729b7b262aaee6;p=thirdparty%2Fbacula.git Fix #7113 Enable timestamp in tracefile for SD --- diff --git a/bacula/platforms/debian/bacula-sd.in b/bacula/platforms/debian/bacula-sd.in index 13b726e5c..2e6930707 100644 --- a/bacula/platforms/debian/bacula-sd.in +++ b/bacula/platforms/debian/bacula-sd.in @@ -27,7 +27,7 @@ DESC="@BACULA@ Storage Daemon" DAEMON=@sbindir@/${NAME} BUSER=@sd_user@ BGROUP=@sd_group@ -BOPTIONS="-c @sysconfdir@/${NAME}.conf" +BOPTIONS="-dt -c @sysconfdir@/${NAME}.conf" BPORT=@sd_port@ PATH=/sbin:/bin:/usr/sbin:/usr/bin diff --git a/bacula/platforms/redhat/bacula-sd.in b/bacula/platforms/redhat/bacula-sd.in index e8abce3f3..0ea509f3f 100755 --- a/bacula/platforms/redhat/bacula-sd.in +++ b/bacula/platforms/redhat/bacula-sd.in @@ -19,7 +19,7 @@ DAEMON_OPTIONS='' DAEMON_USER=yes SD_USER=@sd_user@ SD_GROUP=@sd_group@ -SD_OPTIONS='' +SD_OPTIONS='-dt' OS=`uname -s` # if /lib/tls exists, force Bacula to use the glibc pthreads instead diff --git a/bacula/platforms/slackware/rc.bacula-sd.in b/bacula/platforms/slackware/rc.bacula-sd.in index ff7a687a2..e9552477d 100644 --- a/bacula/platforms/slackware/rc.bacula-sd.in +++ b/bacula/platforms/slackware/rc.bacula-sd.in @@ -21,7 +21,7 @@ case "$1" in [ -x ${BACSDBIN}/bacula-sd ] && { sleep 2 echo -n "Starting the Storage daemon: " - OPTIONS='' + OPTIONS='-dt' if [ "${SD_USER}" != '' ]; then OPTIONS="${OPTIONS} -u ${SD_USER}" fi diff --git a/bacula/platforms/suse/bacula-sd.in b/bacula/platforms/suse/bacula-sd.in index 0444ff493..1d68d60be 100755 --- a/bacula/platforms/suse/bacula-sd.in +++ b/bacula/platforms/suse/bacula-sd.in @@ -28,6 +28,16 @@ # this gives us funtion rc_status -v to tell us if we succeed or fail . /etc/rc.status +DAEMON_OPTIONS='' +DAEMON_USER=yes +SD_USER=@sd_user@ +SD_GROUP=@sd_group@ +SD_OPTIONS='-dt' +OS=`uname -s` + +# pull in any user defined SD_OPTIONS, SD_USER, SD_GROUP or DAEMON_USER +[ -f /etc/sysconfig/bacula ] && . /etc/sysconfig/bacula + RETVAL=0 case "$1" in start) diff --git a/bacula/platforms/suse/bacula.in b/bacula/platforms/suse/bacula.in index 2bd9685f2..01805d9d5 100644 --- a/bacula/platforms/suse/bacula.in +++ b/bacula/platforms/suse/bacula.in @@ -182,7 +182,7 @@ failure() { case "$1" in start) echo "Starting the Storage daemon" - @sbindir@/bacula-sd $2 -v -c @sysconfdir@//bacula-sd.conf + @sbindir@/bacula-sd $2 -dt -v -c @sysconfdir@//bacula-sd.conf echo "Starting the File daemon" @sbindir@/bacula-fd $2 -v -c @sysconfdir@//bacula-fd.conf sleep 2 diff --git a/bacula/platforms/systemd/bacula-sd.service.in b/bacula/platforms/systemd/bacula-sd.service.in index ba15a6640..2fb45bf1d 100644 --- a/bacula/platforms/systemd/bacula-sd.service.in +++ b/bacula/platforms/systemd/bacula-sd.service.in @@ -24,8 +24,12 @@ RequiresMountsFor=@working_dir@ @sysconfdir@ @sbindir@ Type=simple User=@sd_user@ Group=@sd_group@ -ExecStart=@sbindir@/bacula-sd -fP -c @sysconfdir@/bacula-sd.conf -SuccessExitStatus=15 +Environment="LD_LIBRARY_PATH=@libdir@" +# comment out to get traces working at startup using -T and -d options +#WorkingDirectory=@working_dir@ +ExecStart=@sbindir@/bacula-sd -dt -c @sysconfdir@/bacula-sd.conf +StandardError=syslog +TimeoutStopSec=3min LimitMEMLOCK=infinity [Install]