From 195dbfbf9dd352e910d90406209f36bfb1acfa6c Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 17 Jan 2006 18:27:48 +0000 Subject: [PATCH] - Add patch from bug #527 to allow RedHat user to specify options/user/group for starting each daemon in /etc/sysconf/bacula. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2761 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kes-1.39 | 61 +++++++++++++++++++++++++++ bacula/platforms/redhat/bacula-dir.in | 12 ++++-- bacula/platforms/redhat/bacula-fd.in | 12 ++++-- bacula/platforms/redhat/bacula-sd.in | 12 ++++-- 4 files changed, 85 insertions(+), 12 deletions(-) diff --git a/bacula/kes-1.39 b/bacula/kes-1.39 index ca82eca3b1..b3ae87b2bb 100644 --- a/bacula/kes-1.39 +++ b/bacula/kes-1.39 @@ -3,6 +3,67 @@ General: +Changes to 1.39.4 +17Jan06 +- Add patch from bug #527 to allow RedHat user to specify + options/user/group for starting each daemon in + /etc/sysconf/bacula. +16Jan06 +- Add two new queries to query.sql provided by Arno. One + list volumes known to the Storage device, and the other + lists volumes possibly needing replacement (error, ...). +15Jan06 +- Add periodic (every 24 hours) garbage collection of memory + pool by releasing free buffers. +14Jan06 +- Correct bug counting sized (for display only) in smartall.c +- Print FD mempool stats if debug > 0 rather than 5. +12Jan06 +- Make db_lock() mutex error fail the job rather than abort + Bacula. Canceling the job caused the mutex to fail. +- Correct bug in alist.c that re-allocated the list if the + number of items goes to zero. +- Move the reservation system thread locking to the top level + so that one job at a time tries all possible drives before + waiting. +- Implement a reservation 'fail' message queue that is built + and destroyed on each pass through the reservation system. + These messages are displayed in a 'Jobs waiting to reserve + a drive' list during a 'status storage='. Note, multiple + messages will generally print for each JobId because they + represent the different problems with either the same drive + or different drives. If this output proves too confusing + of voluminous, I will display it only when debug level 1 + or greater is enabled in the SD. +11Jan06 +- Add enable/disable job=. This command prevents + the specified job from being scheduled. Even when disabled, + the job can be manually started from the console. +- During 'update slots' clear all InChanger flags where the + StorageId is zero (old Media records). + +Beta release 1.38.4: +09Jan06 +- Fix autochanger code to strip leading spaces from returned + slots number. Remove bc from chio-changer. +- Back port a bit of 1.39 crypto code to reduce diffs. +- Fix first call to autochanger that missed close()ing the + drive. Put close() just before each run_program(). Fixes + Arno's changer bug. +07Jan06 +- Add PoolId to Job record when updating it at job start time. +06Jan06 +- Pull in more code from 1.39 so that there are fewer file + differences (the new ua_dotcmds.c, base64.h, crypto.h + hmac.c jcr.c (dird and lib) lib.h md5.h parse_conf.c + util.c. Aside from ua_dotcmds.c these are mostly crypto + upgrades. +- Implement new method of walking the jcr chain. The + incr/dec of the use_count is done within the walking + routines. This should prevent a jcr from being freed + from under the walk routines. + + Changes to 1.39.3: 04Jan06 - Start implementing Verify list output. diff --git a/bacula/platforms/redhat/bacula-dir.in b/bacula/platforms/redhat/bacula-dir.in index 93e8c211d8..8d2e1f2f8a 100755 --- a/bacula/platforms/redhat/bacula-dir.in +++ b/bacula/platforms/redhat/bacula-dir.in @@ -14,25 +14,29 @@ DIR_USER=@dir_user@ DIR_GROUP=@dir_group@ +DIR_OPTIONS='' OS=`uname -s` # if /lib/tls exists, force Bacula to use the glibc pthreads instead if [ -d "/lib/tls" -a $OS = "Linux" -a `uname -r | cut -c1-3` = "2.4" ] ; then export LD_ASSUME_KERNEL=2.4.19 fi + +# pull in any user defined DIR_DIR_OPTIONS, DIR_USER, or DIR_GROUP +[ -f /etc/sysconfig/bacula ] && . /etc/sysconfig/bacula + RETVAL=0 case "$1" in start) - OPTIONS='' if [ "${DIR_USER}" != '' ]; then - OPTIONS="${OPTIONS} -u ${DIR_USER}" + DIR_OPTIONS="${DIR_OPTIONS} -u ${DIR_USER}" fi if [ "${DIR_GROUP}" != '' ]; then - OPTIONS="${OPTIONS} -g ${DIR_GROUP}" + DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}" fi echo -n "Starting Bacula Director services: " - daemon @sbindir@/bacula-dir $2 ${OPTIONS} -c @sysconfdir@/bacula-dir.conf + daemon @sbindir@/bacula-dir $2 ${DIR_OPTIONS} -c @sysconfdir@/bacula-dir.conf RETVAL=$? echo [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-dir diff --git a/bacula/platforms/redhat/bacula-fd.in b/bacula/platforms/redhat/bacula-fd.in index aecbad6dbf..4919337f8b 100755 --- a/bacula/platforms/redhat/bacula-fd.in +++ b/bacula/platforms/redhat/bacula-fd.in @@ -14,25 +14,29 @@ FD_USER=@fd_user@ FD_GROUP=@fd_group@ +FD_OPTIONS='' OS=`uname -s` # if /lib/tls exists, force Bacula to use the glibc pthreads instead if [ -d "/lib/tls" -a $OS = "Linux" -a `uname -r | cut -c1-3` = "2.4" ] ; then export LD_ASSUME_KERNEL=2.4.19 fi + +# pull in any user defined FD_OPTIONS, FD_USER, FD_GROUP +[ -f /etc/sysconfig/bacula ] && . /etc/sysconfig/bacula + RETVAL=0 case "$1" in start) - OPTIONS='' if [ "${FD_USER}" != '' ]; then - OPTIONS="${OPTIONS} -u ${FD_USER}" + FD_OPTIONS="${FD_OPTIONS} -u ${FD_USER}" fi if [ "${FD_GROUP}" != '' ]; then - OPTIONS="${OPTIONS} -g ${FD_GROUP}" + FD_OPTIONS="${FD_OPTIONS} -g ${FD_GROUP}" fi echo -n "Starting Bacula File services: " - daemon @sbindir@/bacula-fd $2 ${OPTIONS} -c @sysconfdir@/bacula-fd.conf + daemon @sbindir@/bacula-fd $2 ${FD_OPTIONS} -c @sysconfdir@/bacula-fd.conf RETVAL=$? echo [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-fd diff --git a/bacula/platforms/redhat/bacula-sd.in b/bacula/platforms/redhat/bacula-sd.in index 2e9200bb4e..25edb43e2a 100755 --- a/bacula/platforms/redhat/bacula-sd.in +++ b/bacula/platforms/redhat/bacula-sd.in @@ -14,26 +14,30 @@ SD_USER=@sd_user@ SD_GROUP=@sd_group@ +SD_OPTIONS='' OS=`uname -s` # if /lib/tls exists, force Bacula to use the glibc pthreads instead if [ -d "/lib/tls" -a $OS = "Linux" -a `uname -r | cut -c1-3` = "2.4" ] ; then export LD_ASSUME_KERNEL=2.4.19 fi + +# pull in any user defined SD_OPTIONS, SD_USER, or SD_GROUP +[ -f /etc/sysconfig/bacula ] && . /etc/sysconfig/bacula + RETVAL=0 case "$1" in start) - OPTIONS='' if [ "${SD_USER}" != '' ]; then - OPTIONS="${OPTIONS} -u ${SD_USER}" + SD_OPTIONS="${SD_OPTIONS} -u ${SD_USER}" fi if [ "${SD_GROUP}" != '' ]; then - OPTIONS="${OPTIONS} -g ${SD_GROUP}" + SD_OPTIONS="${SD_OPTIONS} -g ${SD_GROUP}" fi echo -n "Starting Bacula Storage services: " - daemon @sbindir@/bacula-sd $2 ${OPTIONS} -c @sysconfdir@/bacula-sd.conf + daemon @sbindir@/bacula-sd $2 ${SD_OPTIONS} -c @sysconfdir@/bacula-sd.conf RETVAL=$? echo [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-sd -- 2.39.5