Sat, 21 May 2011 22:05:42 +0200
Correct diverse buildconf of upstream release and reconcile packaging somewhat.
These changes stem from the obvious changes in the latest vendor release, but
from discussions with trolls Daniel and Oswald as well regarding build config.
This commital follows conclusion of buildconf adjustments to allow the new
vendor version to build on Linux AMD64, but is incomplete as many packaging
comments show. The next series of changes focus on Solaris IA32 and reduction
of buildconf adjustments testing old problems comprehensively in anticipation
of discussion at the upcoming Nokia Contributor Summit in Berlin.
1 #!@l_prefix@/bin/openpkg rc
2 ##
3 ## rc.bacula -- Run-Commands
4 ##
6 %config
7 bacula_enable="$openpkg_rc_def"
8 bacula_dir_enable="@with_server@"
9 bacula_sd_enable="@with_server@"
10 bacula_fd_enable="yes"
11 bacula_debug=""
12 bacula_log_dir="@l_prefix@/var/bacula/bacula-dir.log"
13 bacula_log_fd="@l_prefix@/var/bacula/bacula-fd.log"
14 bacula_log_sd="@l_prefix@/var/bacula/bacula-sd.log"
15 bacula_log_prolog="true"
16 bacula_log_epilog="true"
17 bacula_log_numfiles="10"
18 bacula_log_minsize="1M"
19 bacula_log_complevel="9"
21 %status -u @l_susr@ -o
22 bacula_usable="no"
23 bacula_active="no"
24 [ ".`@l_prefix@/libexec/bacula/bacula status 2>/dev/null | grep running`" != . ] && bacula_active="yes"
25 echo "bacula_enable=\"$bacula_enable\""
26 echo "bacula_usable=\"$bacula_usable\""
27 echo "bacula_active=\"$bacula_active\""
29 %start -u @l_susr@
30 rcService bacula enable yes || exit 0
31 rcService bacula active yes && exit 0
32 @l_prefix@/libexec/bacula/bacula start \
33 "$bacula_debug" $bacula_dir_enable $bacula_sd_enable $bacula_fd_enable
35 %stop -u @l_susr@
36 rcService bacula enable yes || exit 0
37 rcService bacula active no && exit 0
38 @l_prefix@/libexec/bacula/bacula stop
40 %restart -u @l_susr@
41 rcService bacula enable yes || exit 0
42 rc bacula stop
43 sleep 5
44 rc bacula start
46 %daily -u @l_susr@
47 rcService bacula enable yes || exit 0
48 for logfile in $bacula_log_dir $bacula_log_fd $bacula_log_sd; do
49 shtool rotate -f \
50 -n ${bacula_log_numfiles} -s ${bacula_log_minsize} -d \
51 -z ${bacula_log_complevel} -o @l_rusr@ -g @l_rgrp@ -m 640 \
52 -P "${bacula_log_prolog}" \
53 -E "${bacula_log_epilog}" \
54 $logfile
55 done