]> git.sur5r.net Git - bacula/bacula/commitdiff
Backport copyright changes
authorKern Sibbald <kern@sibbald.com>
Wed, 24 Jun 2015 10:30:10 +0000 (12:30 +0200)
committerKern Sibbald <kern@sibbald.com>
Wed, 24 Jun 2015 10:30:10 +0000 (12:30 +0200)
74 files changed:
bacula/Makefile.in
bacula/autoconf/bacula-macros/db.m4
bacula/autoconf/config.h.in
bacula/autoconf/mkinstalldirs
bacula/examples/nagios/check_bacula/check_bacula.c
bacula/manpages/bacula-tray-monitor.1
bacula/manpages/bcopy.8
bacula/platforms/Makefile.in
bacula/platforms/aix/Makefile.in
bacula/platforms/alpha/Makefile.in
bacula/platforms/alpha/bacula-fd.in
bacula/platforms/bsdi/Makefile.in
bacula/platforms/bsdi/bacula-dir.in
bacula/platforms/bsdi/bacula-fd.in
bacula/platforms/bsdi/bacula-sd.in
bacula/platforms/contrib-rpm/build_rpm.sh
bacula/platforms/contrib-rpm/rpm_wizard.sh
bacula/platforms/contrib-rpm/rpmkey.spec
bacula/platforms/darwin/Makefile.in
bacula/platforms/debian/Makefile.in
bacula/platforms/debian/bacula-dir.in
bacula/platforms/debian/bacula-fd.in
bacula/platforms/debian/bacula-sd.in
bacula/platforms/freebsd/Makefile.in
bacula/platforms/freebsd/bacula-dir.in
bacula/platforms/freebsd/bacula-fd.in
bacula/platforms/freebsd/bacula-sd.in
bacula/platforms/gentoo/Makefile.in
bacula/platforms/gentoo/bacula-dir.in
bacula/platforms/gentoo/bacula-fd.in
bacula/platforms/gentoo/bacula-sd.in
bacula/platforms/gentoo/bacula.ebuild
bacula/platforms/hurd/Makefile.in
bacula/platforms/hurd/bacula-dir.in
bacula/platforms/hurd/bacula-fd.in
bacula/platforms/hurd/bacula-sd.in
bacula/platforms/irix/Makefile.in
bacula/platforms/irix/bacula-dir.in
bacula/platforms/irix/bacula-fd.in
bacula/platforms/irix/bacula-sd.in
bacula/platforms/mandrake/Makefile.in
bacula/platforms/mandrake/bacula-dir.in
bacula/platforms/mandrake/bacula-fd.in
bacula/platforms/mandrake/bacula-sd.in
bacula/platforms/mandrake/bacula.spec.bluca.in
bacula/platforms/openbsd/Makefile.in
bacula/platforms/openbsd/bacula-dir.in
bacula/platforms/openbsd/bacula-fd.in
bacula/platforms/openbsd/bacula-sd.in
bacula/platforms/osx/Makefile.in
bacula/platforms/osx/README
bacula/platforms/redhat/Makefile.in
bacula/platforms/redhat/bacula-dir.in
bacula/platforms/redhat/bacula-fd.in
bacula/platforms/redhat/bacula-sd.in
bacula/platforms/slackware/Makefile.in
bacula/platforms/slackware/functions.bacula.in
bacula/platforms/slackware/rc.bacula-dir.in
bacula/platforms/slackware/rc.bacula-fd.in
bacula/platforms/slackware/rc.bacula-sd.in
bacula/platforms/solaris/Makefile.in
bacula/platforms/solaris/bacula-dir.in
bacula/platforms/solaris/bacula-fd.in
bacula/platforms/solaris/bacula-sd.in
bacula/platforms/suse/Makefile.in
bacula/platforms/suse/bacula-dir.in
bacula/platforms/suse/bacula-fd.in
bacula/platforms/suse/bacula-sd.in
bacula/platforms/suse/bacula.in
bacula/platforms/systemd/Makefile.in
bacula/platforms/systemd/bacula-dir.service.in
bacula/platforms/systemd/bacula-fd.service.in
bacula/platforms/systemd/bacula-sd.service.in
bacula/platforms/unknown/Makefile.in

index 6e2990630b001733fd979b5c3f8a116b2c162cfa..57ef3fbb280916d4c5829f2dd39b3a18244c44f4 100755 (executable)
@@ -1,3 +1,4 @@
+#
 # Master Makefile
 #
 # Author: Kern Sibbald, Copyright 2000-2015
@@ -12,8 +13,8 @@ dir_user=@dir_user@
 srcdir =       @srcdir@
 VPATH =        @srcdir@
 .PATH:         @srcdir@
-topdir = .
-thisdir = .
+topdir = @BUILD_DIR@
+thisdir = @BUILD_DIR@
 
 
 first_rule: all
@@ -53,7 +54,7 @@ depend:
        @for I in ${all_subdirs}; \
          do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
        
-bacula-fd: Makefile       
+bacula-fd: Makefile    
        @for I in ${fd_subdirs}; \
          do (cd $$I; echo "==>Entering directory `pwd`"; \
              $(MAKE) DESTDIR=$(DESTDIR) all || \
@@ -106,15 +107,19 @@ installdirs:
        $(MKDIR) $(DESTDIR)$(scriptdir)
        $(MKDIR) $(DESTDIR)$(docdir)
        $(MKDIR) $(DESTDIR)$(archivedir)
+       $(MKDIR) $(DESTDIR)$(bsrdir)
+       $(MKDIR) $(DESTDIR)${logdir}
        -if test ! -d $(DESTDIR)$(working_dir) ; then \
           $(MKDIR) $(DESTDIR)$(working_dir); \
           chmod 770 $(DESTDIR)$(working_dir); \
        fi
        -if test "x$(dir_user)" != "x" ; then \
           chown $(dir_user) $(DESTDIR)$(working_dir); \
+          chown $(dir_user) $(DESTDIR)$(logdir); \
        fi
        -if test "x$(dir_group)" != "x" ; then \
           chgrp $(dir_group) $(DESTDIR)$(working_dir); \
+          chgrp $(dir_group) $(DESTDIR)$(logdir); \
        fi
 
 install: installdirs
@@ -125,16 +130,16 @@ uninstall:
        @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
 
 install-autostart:
-       (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
+       (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
 
 install-autostart-dir:
-       (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
+       (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
 
 install-autostart-fd:
-       (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
+       (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
 
 install-autostart-sd:
-       (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1) 
+       (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
 
 uninstall-autostart:
        (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
@@ -190,7 +195,7 @@ distclean:
        @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
        @$(RMF) bconsole gconsole
        @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
-       @$(RMF) working/* kerns-* 
+       @$(RMF) working/* kerns-*
        @$(RMF) -rf txt diff src/python src/testprogs
        @$(RMF) libtool
 
@@ -217,22 +222,4 @@ distcopy:
 
 distrib: configure autoconf/config.h.in distdirs distcopy
 
-test:
-
-
-tar.gz:  ../$(VERNAME).tar.gz
-../$(VERNAME).tar.gz:
-       (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
-
-tar.Z: ../$(VERNAME).tar.Z
-../$(VERNAME).tar.Z:
-       (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
-
-tar.bz2: ../$(VERNAME).tar.bz2
-../$(VERNAME).tar.bz2:
-       (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
-
-uuencode: tar.gz
-       uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
-
 # ------------------------------------------------------------------------
index 0f4650cf793c89eef3b2329d754b6f95bf962700..d9d4e1fcf7ebf2d7d90cd4522035295a6d1c1daa 100644 (file)
@@ -808,7 +808,7 @@ AC_HELP_STRING([--with-sqlite3@<:@=DIR@:>@], [Include SQLite3 support. DIR is th
      if test "x$support_batch_insert" = "xyes"; then
          dnl For sqlite checking
          saved_LDFLAGS="${LDFLAGS}"
-         LDFLAGS="${saved_LDFLAGS} -L$SQLITE_LIBDIR"
+         LDFLAGS="${saved_LDFLAGS} -lpthread -L$SQLITE_LIBDIR"
 
          AC_CHECK_LIB(sqlite3, sqlite3_threadsafe, AC_DEFINE(HAVE_SQLITE3_THREADSAFE, 1, [Set if have sqlite3_threadsafe]))
          if test "x$ac_cv_lib_sqlite3_sqlite3_threadsafe" = "xyes"; then
index 33b04f1e80d3396b8e255d69ad479e4bfe21cc6f..c871a724310f3298cdc60cf904ee07196c94ab38 100644 (file)
@@ -2,6 +2,11 @@
 /* ------------------------------------------------------------------------- */
 /* --                     CONFIGURE SPECIFIED FEATURES                    -- */
 /* ------------------------------------------------------------------------- */
+
+/*
+ * Author: Kern Sibbald, 2002-2015
+ * License: BSD 2-Clause
+ */
    
 /* Define if you want to use MySQL as Catalog database */
 #undef USE_MYSQL_DB
 /* If using the C implementation of alloca, define if you know the
    direction of stack growth for your system; otherwise it will be
    automatically deduced at runtime.
-       STACK_DIRECTION > 0 => grows toward higher addresses
-       STACK_DIRECTION < 0 => grows toward lower addresses
-       STACK_DIRECTION = 0 => direction of growth unknown */
+        STACK_DIRECTION > 0 => grows toward higher addresses
+        STACK_DIRECTION < 0 => grows toward lower addresses
+        STACK_DIRECTION = 0 => direction of growth unknown */
 #undef STACK_DIRECTION
 
 /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
index 6fbe5e117629c75a723710efc4b2e0341c17c895..4191a45dbd72ecd24c25b45a53e94ea0a4b5baf7 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # mkinstalldirs --- make directory hierarchy
 
-scriptversion=2004-02-15.20
+scriptversion=2009-04-28.21; # UTC
 
 # Original author: Noah Friedman <friedman@prep.ai.mit.edu>
 # Created: 1993-05-16
@@ -11,8 +11,11 @@ scriptversion=2004-02-15.20
 # bugs to <bug-automake@gnu.org> or send patches to
 # <automake-patches@gnu.org>.
 
+nl='
+'
+IFS=" ""       $nl"
 errstatus=0
-dirmode=""
+dirmode=
 
 usage="\
 Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
@@ -27,7 +30,7 @@ while test $# -gt 0 ; do
   case $1 in
     -h | --help | --h*)         # -h for help
       echo "$usage"
-      exit 0
+      exit $?
       ;;
     -m)                         # -m PERM arg
       shift
@@ -37,7 +40,7 @@ while test $# -gt 0 ; do
       ;;
     --version)
       echo "$0 $scriptversion"
-      exit 0
+      exit $?
       ;;
     --)                         # stop option processing
       shift
@@ -103,13 +106,21 @@ esac
 
 for file
 do
-  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+  case $file in
+    /*) pathcomp=/ ;;
+    *)  pathcomp= ;;
+  esac
+  oIFS=$IFS
+  IFS=/
+  set fnord $file
   shift
+  IFS=$oIFS
 
-  pathcomp=
   for d
   do
-    pathcomp="$pathcomp$d"
+    test "x$d" = x && continue
+
+    pathcomp=$pathcomp$d
     case $pathcomp in
       -*) pathcomp=./$pathcomp ;;
     esac
@@ -124,7 +135,7 @@ do
       else
        if test ! -z "$dirmode"; then
          echo "chmod $dirmode $pathcomp"
-         lasterr=""
+         lasterr=
          chmod "$dirmode" "$pathcomp" || lasterr=$?
 
          if test ! -z "$lasterr"; then
@@ -134,7 +145,7 @@ do
       fi
     fi
 
-    pathcomp="$pathcomp/"
+    pathcomp=$pathcomp/
   done
 done
 
@@ -146,5 +157,6 @@ exit $errstatus
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
index 1546da79387f3b7da77f05e2b770646ab49799dd..db0e22d2b8cdd5a2a8cee77c838e65791ed87839 100644 (file)
@@ -345,7 +345,7 @@ int docmd(monitoritem* item, const char* command, char *answer) {
             item->D_sock->signal(BNET_HB_RESPONSE);
          }
          else {
-                sprintf(answer, "BACULA WARNING - Unexpected signal received : %s ", bnet_sig_to_ascii(item->D_sock));
+                sprintf(answer, "BACULA WARNING - Unexpected signal received : %s ", bnet_sig_to_ascii(item->D_sock->msglen));
          }
       }
       else { /* BNET_HARDEOF || BNET_ERROR */
index 1a62cf3c5188baeebe8d28a4581336579085f3ea..a07cb596ffdc7f68766e40511179e7a31d281e27 100644 (file)
@@ -43,4 +43,4 @@ This manual page was written by Jose Luis Tallon
 .nh
 <jltallon@adv\-solutions.net>.
 .SH COPYRIGHT
-This man page document is released under the LGPL version 3.0 license.
+This man page document is released under the BSD 2-Clause license.
index 47314c6b05c0d3cd7fdad0f6e4bcde7707ec3dda..c6aebfe1f6776e3a98367ef4dd7d5694360a7c9b 100644 (file)
@@ -8,9 +8,9 @@
 .SH NAME
  bcopy \- Bacula's 'Copy from tape'
 .SH SYNOPSIS
-.B bcopy
+.B bcopy 
 .RI [ options ]
-.I input-archive
+.I input-archive 
 .I output-archive
 .br
 .SH DESCRIPTION
@@ -19,7 +19,7 @@ This manual page documents briefly the
 command.
 .PP
 .\" TeX users may be more comfortable with the \fB<whatever>\fP and
-.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
+.\" \fI<whatever>\fP escape sequences to invoke bold face and italics, 
 .\" respectively.
 .SH OPTIONS
 A summary of options is included below.
@@ -59,7 +59,7 @@ Set verbose mode.
 .br
 .SH AUTHOR
 This manual page was written by Jose Luis Tallon
-.nh
+.nh 
 <jltallon@adv\-solutions.net>.
 .SH COPYRIGHT
-This man page document is released under the LGPL version 3.0 license.
+This man page document is released under the BSD 2-Clause license.
index fedcde3cf740340608f2741f0e15ac8452e9b9a4..b2e81841d442e79294bcbe465ef0d6bfbaa823d5 100644 (file)
@@ -1,3 +1,5 @@
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
 #
 # This is the makefile template for the platform directory
 # which contains general platform installation.
index 3dbee96cc116ee023fa790b9a53a918f4d498bb1..91e74c1653b5b5de885705f360eefb9b19a34818 100644 (file)
@@ -3,6 +3,8 @@
 # Makefile for the AXI specific installation.
 #
 #  1 March 2003 -- Kern Sibbald
+# Copyright (C) 2003-2015, Kern Sibbald
+# License: BSD 2-Clause
 #
 #  for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
 #
index 038615bfc729ef019ef83ec310376f211867caa2..803462b04088c37a6ed1f279d6537f85efb13f12 100644 (file)
@@ -1,4 +1,7 @@
 # 
+# Copyright (C) Kern Sibbald 2004-2015
+# License: BSD 2-Clause
+#
 # This file is used as the template to create the
 # Makefile for the Tru64 specific installation.
 #
index 74a12c00dd7dd541a515416de9f407e5211a5f32..9ea8b23f52eb4c54212437fdb57f13e2334ed0c2 100644 (file)
@@ -1,5 +1,8 @@
 #!/bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula File daemon.
 #
@@ -9,6 +12,7 @@
 #  for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ 
 #
 
+RETVAL=0
 case "$1" in
     start)
        echo "Starting the Bacula File daemon: "
@@ -30,10 +34,11 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index 5a84037692206d0a0acaecbebf1ad55876065afb..314abc31fad30324417e3fde00210b138e39700a 100644 (file)
@@ -1,3 +1,6 @@
+#
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
 # 
 # This file is used as the template to create the
 # Makefile for the Solaris specific installation.
index af7b0c5c1a8b2763e7f386a89036bc4560a21c5b..f9667719c14dbc8e77ec989677ab4d4a650907fb 100755 (executable)
@@ -1,4 +1,6 @@
 #! /bin/sh
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
 #
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Director daemon
@@ -29,10 +31,11 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index 2c41b343253c4b34a4f1750948d55f6ca9ebc845..f02b16db7b0e7a584e160f9ced7ab9d609c35657 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula File daemon.
 #
@@ -9,6 +12,7 @@
 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
 #
 
+RETVAL=0
 case "$1" in
     start)
        echo "Starting the Bacula File daemon: "
@@ -28,10 +32,11 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index 9f4e6f0c7089fa7b1f845159834ac303b2e85699..1db2740aa1266375c8885dda2c83a921c27cc878 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Storage daemon.
 #
@@ -9,6 +12,7 @@
 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
 #
 
+RETVAL=0
 case "$1" in
     start)
        echo "Starting the Bacula Storage daemon: "
@@ -28,10 +32,11 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index 67d82dc7daeb81c8acd08c00ec573f4d7f6754ba..ba8675b083a153e96d79c70309d8b5da5c2f3474 100755 (executable)
@@ -3,9 +3,10 @@
 # shell script to build bacula rpm release
 # copy this script into a working directory with the src rpm to build and execute
 # 19 Aug 2006 D. Scott Barninger
+#
+# Copyright Kern Sibbald 2006-2015
+# License: BSD 2-Clause
 
-# Copyright (C) 2006 Free Software Foundation Europe e.V.
-# licensed under GPL-v2
 
 # signing rpms
 # Make sure you have a .rpmmacros file in your home directory containing the following:
@@ -115,10 +116,10 @@ rpmbuild --rebuild --define "build_${PLATFORM} 1" \
 rm -rf ${RPMBUILD}/*
 
 if [ "$BUILDBAT" = "1" ]; then
-       echo Building Bat package for "$PLATFORM"...
-       sleep 2
-       rpmbuild --rebuild ${SRPM2}
-       rm -rf ${RPMBUILD}/*
+        echo Building Bat package for "$PLATFORM"...
+        sleep 2
+        rpmbuild --rebuild ${SRPM2}
+        rm -rf ${RPMBUILD}/*
 fi
 
 echo Building Docs package for "$PLATFORM"...
@@ -127,10 +128,10 @@ rpmbuild --rebuild ${SRPM3}
 rm -rf ${RPMBUILD}/*
 
 if [ "$BUILDMTX" = "1" ]; then
-       echo Building mtx package for "$PLATFORM"...
-       sleep 2
-       rpmbuild --rebuild ${SRPM4}
-       rm -rf ${RPMBUILD}/*
+        echo Building mtx package for "$PLATFORM"...
+        sleep 2
+        rpmbuild --rebuild ${SRPM4}
+        rm -rf ${RPMBUILD}/*
 fi
 
 # delete the updatedb package and any debuginfo packages built
@@ -153,8 +154,8 @@ mv -f ${RPMDIR}/bacula-sqlite-${VERSION}-${RELEASE}.${ARCH}.rpm \
 ./bacula-sqlite-${VERSION}-${RELEASE}.${FILENAME}.${ARCH}.rpm
 
 if [ "$BUILDMTX" = "1" ]; then
-       mv -f ${RPMDIR}/bacula-mtx-${VERSION}-${RELEASE}.${ARCH}.rpm \
-       ./bacula-mtx-${VERSION}-${RELEASE}.${FILENAME}.${ARCH}.rpm
+        mv -f ${RPMDIR}/bacula-mtx-${VERSION}-${RELEASE}.${ARCH}.rpm \
+        ./bacula-mtx-${VERSION}-${RELEASE}.${FILENAME}.${ARCH}.rpm
 fi
 
 mv -f ${RPMDIR}/bacula-client-${VERSION}-${RELEASE}.${ARCH}.rpm \
@@ -164,8 +165,8 @@ mv -f ${RPMDIR}/bacula-libs-${VERSION}-${RELEASE}.${ARCH}.rpm \
 ./bacula-libs-${VERSION}-${RELEASE}.${FILENAME}.${ARCH}.rpm
 
 if [ "$BUILDBAT" = "1" ]; then
-       mv -f ${RPMDIR}/bacula-bat-${VERSION}-${RELEASE}.${ARCH}.rpm \
-       ./bacula-bat-${VERSION}-${RELEASE}.${FILENAME}.${ARCH}.rpm
+        mv -f ${RPMDIR}/bacula-bat-${VERSION}-${RELEASE}.${ARCH}.rpm \
+        ./bacula-bat-${VERSION}-${RELEASE}.${FILENAME}.${ARCH}.rpm
 fi
 
 mv -f ${RPMDIR2}/bacula-docs-${VERSION}-${RELEASE}.noarch.rpm .
index 89857dc6238f49dfb5e63b3442af3e098d19804d..b2ceb9bf85ad72c4552b44adcd786d05e0ced45a 100755 (executable)
@@ -3,9 +3,10 @@
 # shell script wizard to build bacula rpm using gnome dialogs
 # requires zenity to be installed
 # 30 Jul 2006 D. Scott Barninger
+#
+# Copyright Kern Sibbald 2006-2015
+# License: BSD 2-Clause
 
-# Copyright (C) 2006 Free Software Foundation Europe e.V.
-# licensed under GPL-v2
 
 # usage ./rpm_wizard.sh
 
index 81183a1abbf79f0765e225cd1cc3b5735042d39d..bde76244cceb5d4af51401da6600f46aa1e76146 100644 (file)
@@ -1,6 +1,7 @@
 # rpm public key package
-# Copyright (C) 2006 Free Software Foundation Europe e.V.
 #
+# Copyright Kern Sibbald 2000-2015
+# License: BSD 2-Clause
 #
 
 # replace the string yournam with your name
@@ -14,7 +15,7 @@ Summary: The %{pubkeyname} rpm public key
 Name: rpmkey-%{pubkeyname}
 Version: 0.1
 Release: 1
-License: GPL v2
+License: BSD 2-Clause
 Group: System/Packages
 Source0: %{pubkeyname}.asc
 BuildArch: noarch
index c6fde3ee46696f3954e6af7c09cc7012c95ab741..f6eef7a8b763b22d81f354c37dd66745e4ce646b 100644 (file)
@@ -1,4 +1,7 @@
 # 
+# Copyright (C) Kern Sibbald 2003-2015
+# License: BSD 2-Clause
+#
 # This file is used as the template to create the
 # Makefile for the Darwin specific installation.
 #
index aa77f36013fb60eaaab840290097e1f662b7b032..77533d76a2225972ff548ac454b48961e3dec70a 100644 (file)
@@ -1,3 +1,6 @@
+#
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
 # 
 # This file is used as the template to create the
 # Makefile for the Debian/Ubuntu/Kubuntu specific installation.
index 73253dce8e0590ff45472861a3f6c88bce4e0f4c..b02fad60444564f18bd1d92eda66dc1025f23186 100644 (file)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
+#
 # bacula  This shell script takes care of starting and stopping
 #        the bacula Director daemon on Debian/Ubuntu/Kubuntu 
 #        systems. 
@@ -48,6 +51,7 @@ if [ "x${BUSER}" != "x" ]; then
    fi
 fi
 
+RETVAL=0
 case "$1" in
    start)
       echo -n "Starting ${DESC}: "
@@ -65,6 +69,7 @@ case "$1" in
       $0 stop
       sleep 5
       $0 start
+      RETVAL=$?
       ;;
    *)
       echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
index 181625ce7d52d5bec28775cc0e153fe08237e1d9..af6b640dd238d36c14cc71ef25013d322373864f 100644 (file)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
+# 
 # bacula  This shell script takes care of starting and stopping
 #        the bacula Director daemon on Debian/Ubuntu/Kubuntu 
 #        systems. 
@@ -48,6 +51,7 @@ if [ "x${BUSER}" != "x" ]; then
    fi
 fi
 
+RETVAL=0
 case "$1" in
    start)
       echo -n "Starting ${DESC}: "
@@ -65,6 +69,7 @@ case "$1" in
       $0 stop
       sleep 5
       $0 start
+      RETVAL=$?
       ;;
    *)
       echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
index 175330475560742db4e70a31ebcb13fa0544dbe4..7c61610057c1d07b558d88972b5c8fe72bc5ccf5 100644 (file)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
+# 
 # bacula  This shell script takes care of starting and stopping
 #        the bacula Director daemon on Debian/Ubuntu/Kubuntu 
 #        systems. 
@@ -48,6 +51,7 @@ if [ "x${BUSER}" != "x" ]; then
    fi
 fi
 
+RETVAL=0
 case "$1" in
    start)
       echo -n "Starting ${DESC}: "
@@ -65,6 +69,7 @@ case "$1" in
       $0 stop
       sleep 5
       $0 start
+      RETVAL=$?
       ;;
    *)
       echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
index b97f62c803b847bf9c4eceb30f7a105c55b91bbc..3911a191bb76c4fff017e79ba276c44a26cab681 100644 (file)
@@ -1,3 +1,6 @@
+#
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
 # 
 # This file is used as the template to create the
 # Makefile for the Solaris specific installation.
index af7b0c5c1a8b2763e7f386a89036bc4560a21c5b..6f283f087486d0895f3d79e8bd17494fc4a78ffc 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Director daemon
 #
@@ -29,10 +32,11 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index 2c41b343253c4b34a4f1750948d55f6ca9ebc845..f02b16db7b0e7a584e160f9ced7ab9d609c35657 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula File daemon.
 #
@@ -9,6 +12,7 @@
 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
 #
 
+RETVAL=0
 case "$1" in
     start)
        echo "Starting the Bacula File daemon: "
@@ -28,10 +32,11 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index 9f4e6f0c7089fa7b1f845159834ac303b2e85699..1db2740aa1266375c8885dda2c83a921c27cc878 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Storage daemon.
 #
@@ -9,6 +12,7 @@
 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
 #
 
+RETVAL=0
 case "$1" in
     start)
        echo "Starting the Bacula Storage daemon: "
@@ -28,10 +32,11 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index 4c7c9b025000a4b09006862ac2f4e07736ac776c..d07beb0d82e2582958b2b7e9ed727abbfd15fdfe 100644 (file)
@@ -1,4 +1,7 @@
-# 
+#
+# Copyright (C) Kern Sibbald 2003-2015
+# License: BSD 2-Clause
+#
 # This file is used as the template to create the
 # Makefile for the Gentoo specific installation.
 #
index a4cbca733d513fd4fb4769da4c2f9f68d7266ee9..f62574f394f7af7697db24d1f05013a6f45a1686 100755 (executable)
@@ -1,5 +1,8 @@
 #!/sbin/runscript
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Director daemon for the Gentoo release
 #
index 98e5efeb368845dd72c56a1f14071926fd699e39..8248e372982281db10de9b5dc4ad7cc60fbef13e 100755 (executable)
@@ -1,5 +1,8 @@
 #!/sbin/runscript
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula File daemon for the Gentoo release.
 #
index 26c6f745668ac4cb4950cdeb1b086b8223b5a4e2..44184ae9a308b3b03734617c1ef2baa25d9f1174 100755 (executable)
@@ -1,5 +1,8 @@
 #!/sbin/runscript
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Storage daemon for the Gentoo release.
 #
index b87c6248f4fd1a763de135a15eeabd33932ea209..ef70d471cd794d01633149a56b553a50930c17ff 100644 (file)
@@ -1,5 +1,7 @@
 # Copyright 2004 D. Scott Barninger
-# Distributed under the terms of the GNU General Public License v2
+# Copyright Kern Sibbald 2004-2015
+# License: BSD 2-Clause
+#
 #
 # Modified from bacula-1.34.5.ebuild for 1.36.0 release
 # 24 Oct 2004 D. Scott Barninger <barninger at fairfieldcomputers dot com>
@@ -37,7 +39,7 @@ DESCRIPTION="featureful client/server network backup suite"
 HOMEPAGE="http://www.bacula.org/"
 SRC_URI="mirror://sourceforge/bacula/${P}.tar.gz"
 
-LICENSE="GPL-2"
+LICENSE="BSD 2-Clause"
 SLOT="0"
 KEYWORDS="x86 ~ppc ~sparc ~amd64"
 IUSE="readline tcpd gnome mysql sqlite X static postgres wxwindows bacula-clientonly bacula-split"
@@ -48,379 +50,379 @@ inherit eutils
 # mysql is the recommended choice ...
 # may need sys-libs/libtermcap-compat but try without first
 DEPEND=">=sys-libs/zlib-1.1.4
-       readline? ( >=sys-libs/readline-4.1 )
-       tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
-       gnome? ( gnome-base/libgnome )
-       gnome? ( app-admin/gnomesu )
-       !bacula-clientonly? (
-               sqlite? ( =dev-db/sqlite-2* )
-               mysql? ( >=dev-db/mysql-3.23 )
-               postgres? ( >=dev-db/postgresql-7.4.0 )
-               sys-apps/mtx
-       )
-       X? ( virtual/x11 )
-       wxwindows? ( >=x11-libs/wxGTK-2.4.2 )
-       virtual/mta
-       dev-libs/gmp
-       app-text/tetex
-       dev-tex/latex2html"
+        readline? ( >=sys-libs/readline-4.1 )
+        tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+        gnome? ( gnome-base/libgnome )
+        gnome? ( app-admin/gnomesu )
+        !bacula-clientonly? (
+                sqlite? ( =dev-db/sqlite-2* )
+                mysql? ( >=dev-db/mysql-3.23 )
+                postgres? ( >=dev-db/postgresql-7.4.0 )
+                sys-apps/mtx
+        )
+        X? ( virtual/x11 )
+        wxwindows? ( >=x11-libs/wxGTK-2.4.2 )
+        virtual/mta
+        dev-libs/gmp
+        app-text/tetex
+        dev-tex/latex2html"
 RDEPEND="${DEPEND}
-       !bacula-clientonly? (
-               sys-apps/mtx
-               app-arch/mt-st
-       )"
+        !bacula-clientonly? (
+                sys-apps/mtx
+                app-arch/mt-st
+        )"
 
 src_compile() {
 
-       # this resolves bug #181
-       epatch ${FILESDIR}/1.36.2-cdrecord-configure.patch
-
-       local myconf=""
-
-       myconf="
-               `use_enable readline`
-               `use_enable gnome`
-               `use_enable tcpd tcp-wrappers`
-               `use_enable X x`"
-
-       # define this to skip building the other daemons ...
-       if use bacula-clientonly
-       then
-               myconf="${myconf} --enable-client-only"
-       fi
-
-       # select database support
-       if ! use bacula-clientonly
-       then
-               # mysql is the recomended choice ...
-               if use mysql
-               then
-                       myconf="${myconf} --with-mysql=/usr"
-               elif use postgres
-               then
-                       myconf="${myconf} --with-postgresql=/usr"
-               elif use sqlite
-               then
-                       myconf="${myconf} --with-sqlite=/usr"
-               elif  use sqlite && use mysql
-               then
-                       myconf="${myconf/--with-sqlite/}"
-               fi
-       fi
-
-       if use wxwindows
-       then
-          myconf="${myconf} --enable-wx-console"
-       fi
-
-       if use readline
-       then
-          myconf="${myconf} --enable-readline"
-       fi
-
-       if use gnome
-       then
-       myconf="${myconf} --enable-tray-monitor"
-       fi
-
-       ./configure \
-               --enable-smartalloc \
-               --prefix=/usr \
-               --mandir=/usr/share/man \
-               --with-pid-dir=/var/run \
-               --sysconfdir=/etc/bacula \
-               --infodir=/usr/share/info \
-               --with-subsys-dir=/var/lock/subsys \
-               --with-working-dir=/var/bacula \
-               --with-scriptdir=/etc/bacula \
-               --with-dir-user=root \
-               --with-dir-group=bacula \
-               --with-sd-user=root \
-               --with-sd-group=bacula \
-               --with-fd-user=root \
-               --with-fd-group=bacula \
-               --host=${CHOST} ${myconf} || die "bad ./configure"
-
-       emake || die "compile problem"
-
-       # for the rescue package regardless of use static
-       cd ${S}/src/filed
-       make static-bacula-fd
-       cd ${S}
-
-       # make the docs
-       cd ${S}/doc/latex
-       make
-       cd ${S}
-
-       if use static
-       then
-               cd ${S}/src/console
-               make static-console
-               cd ${S}/src/dird
-               make static-bacula-dir
-               if use gnome
-               then
-                 cd ${S}/src/gnome-console
-                 make static-gnome-console
-               fi
-               if use wxwindows
-               then
-                 cd ${S}/src/wx-console
-                 make static-wx-console
-               fi
-               cd ${S}/src/stored
-               make static-bacula-sd
-       fi
+        # this resolves bug #181
+        epatch ${FILESDIR}/1.36.2-cdrecord-configure.patch
+
+        local myconf=""
+
+        myconf="
+                `use_enable readline`
+                `use_enable gnome`
+                `use_enable tcpd tcp-wrappers`
+                `use_enable X x`"
+
+        # define this to skip building the other daemons ...
+        if use bacula-clientonly
+        then
+                myconf="${myconf} --enable-client-only"
+        fi
+
+        # select database support
+        if ! use bacula-clientonly
+        then
+                # mysql is the recomended choice ...
+                if use mysql
+                then
+                        myconf="${myconf} --with-mysql=/usr"
+                elif use postgres
+                then
+                        myconf="${myconf} --with-postgresql=/usr"
+                elif use sqlite
+                then
+                        myconf="${myconf} --with-sqlite=/usr"
+                elif  use sqlite && use mysql
+                then
+                        myconf="${myconf/--with-sqlite/}"
+                fi
+        fi
+
+        if use wxwindows
+        then
+           myconf="${myconf} --enable-wx-console"
+        fi
+
+        if use readline
+        then
+           myconf="${myconf} --enable-readline"
+        fi
+
+        if use gnome
+        then
+        myconf="${myconf} --enable-tray-monitor"
+        fi
+
+        ./configure \
+                --enable-smartalloc \
+                --prefix=/usr \
+                --mandir=/usr/share/man \
+                --with-pid-dir=/var/run \
+                --sysconfdir=/etc/bacula \
+                --infodir=/usr/share/info \
+                --with-subsys-dir=/var/lock/subsys \
+                --with-working-dir=/var/bacula \
+                --with-scriptdir=/etc/bacula \
+                --with-dir-user=root \
+                --with-dir-group=bacula \
+                --with-sd-user=root \
+                --with-sd-group=bacula \
+                --with-fd-user=root \
+                --with-fd-group=bacula \
+                --host=${CHOST} ${myconf} || die "bad ./configure"
+
+        emake || die "compile problem"
+
+        # for the rescue package regardless of use static
+        cd ${S}/src/filed
+        make static-bacula-fd
+        cd ${S}
+
+        # make the docs
+        cd ${S}/doc/latex
+        make
+        cd ${S}
+
+        if use static
+        then
+                cd ${S}/src/console
+                make static-console
+                cd ${S}/src/dird
+                make static-bacula-dir
+                if use gnome
+                then
+                  cd ${S}/src/gnome-console
+                  make static-gnome-console
+                fi
+                if use wxwindows
+                then
+                  cd ${S}/src/wx-console
+                  make static-wx-console
+                fi
+                cd ${S}/src/stored
+                make static-bacula-sd
+        fi
 }
 
 src_install() {
-       make DESTDIR=${D} install || die
-
-       if use static
-       then
-               cd ${S}/src/filed
-               cp static-bacula-fd ${D}/usr/sbin/bacula-fd
-               cd ${S}/src/console
-               cp static-console ${D}/usr/sbin/console
-               cd ${S}/src/dird
-               cp static-bacula-dir ${D}/usr/sbin/bacula-dir
-               if use gnome
-               then
-                       cd ${S}/src/gnome-console
-                       cp static-gnome-console ${D}/usr/sbin/gnome-console
-               fi
-               if use wxwindows
-               then
-                       cd ${S}/src/wx-console
-                       cp static-wx-console ${D}/usr/sbin/wx-console
-               fi
-               cd ${S}/src/stored
-               cp static-bacula-sd ${D}/usr/sbin/bacula-sd
-       fi
-
-       # the menu stuff
-       if use gnome
-       then
-       mkdir -p ${D}/usr/share/pixmaps
-       mkdir -p ${D}/usr/share/applications
-       cp ${S}/scripts/bacula.png ${D}/usr/share/pixmaps/bacula.png
-       cp ${S}/scripts/bacula.desktop.gnome2.xsu ${D}/usr/share/applications/bacula.desktop
-       cp ${S}/src/tray-monitor/generic.xpm ${D}/usr/share/pixmaps/bacula-tray-monitor.xpm
-       cp ${S}/scripts/bacula-tray-monitor.desktop \
-               ${D}/usr/share/applications/bacula-tray-monitor.desktop
-       chmod 755 ${D}/usr/sbin/bacula-tray-monitor
-       chmod 644 ${D}/etc/bacula/tray-monitor.conf
-       fi
-
-       if ! use bacula-clientonly
-       then
-               # the database update scripts
-               mkdir -p ${D}/etc/bacula/updatedb
-               cp ${S}/updatedb/* ${D}/etc/bacula/updatedb/
-               chmod 754 ${D}/etc/bacula/updatedb/*
-
-               # the logrotate configuration
-               mkdir -p ${D}/etc/logrotate.d
-               cp ${S}/scripts/logrotate ${D}/etc/logrotate.d/bacula
-               chmod 644 ${D}/etc/logrotate.d/bacula
-
-               # the logwatch scripts
-               mkdir -p ${D}/etc/log.d/conf/logfiles
-               mkdir -p ${D}/etc/log.d/conf/services
-               mkdir -p ${D}/etc/log.d/scripts/services
-               cp ${S}/scripts/logwatch/bacula ${D}/etc/log.d/scripts/services/bacula
-               cp ${S}/scripts/logwatch/logfile.bacula.conf ${D}/etc/log.d/conf/logfiles/bacula.conf
-               cp ${S}/scripts/logwatch/services.bacula.conf ${D}/etc/log.d/conf/services/bacula.conf
-               chmod 755 ${D}/etc/log.d/scripts/services/bacula
-               chmod 644 ${D}/etc/log.d/conf/logfiles/bacula.conf
-               chmod 644 ${D}/etc/log.d/conf/services/bacula.conf
-
-       fi
-
-       # the cdrom rescue package
-       mkdir -p ${D}/etc/bacula/rescue/cdrom
-       cp -R ${S}/rescue/linux/cdrom/* ${D}/etc/bacula/rescue/cdrom/
-       mkdir ${D}/etc/bacula/rescue/cdrom/bin
-       cp ${S}/src/filed/static-bacula-fd ${D}/etc/bacula/rescue/cdrom/bin/bacula-fd
-       chmod 754 ${D}/etc/bacula/rescue/cdrom/bin/bacula-fd
-
-       # documentation
-       for a in ${S}/{ChangeLog,README,ReleaseNotes,kernstodo,LICENSE,doc/latex/bacula.pdf}
-       do
-               dodoc $a
-       done
-
-       dohtml -r ${S}/doc/latex/bacula
-       
-       # clean up permissions left broken by install
-       chmod o-r ${D}/etc/bacula/query.sql
-
-       # remove the working dir so we can add it postinst with group
-       rmdir ${D}/var/bacula
-
-       # init scripts
-       exeinto /etc/init.d
-       if use bacula-clientonly
-       then
-               newexe ${S}/platforms/gentoo/bacula-fd bacula-fd
-       else
-               if use bacula-split
-               then
-                       newexe ${S}/platforms/gentoo/bacula-fd bacula-fd
-                       newexe ${S}/platforms/gentoo/bacula-sd bacula-sd
-                       newexe ${S}/platforms/gentoo/bacula-dir bacula-dir
-               else
-                       newexe ${S}/platforms/gentoo/bacula-init bacula
-               fi
-       fi
+        make DESTDIR=${D} install || die
+
+        if use static
+        then
+                cd ${S}/src/filed
+                cp static-bacula-fd ${D}/usr/sbin/bacula-fd
+                cd ${S}/src/console
+                cp static-console ${D}/usr/sbin/console
+                cd ${S}/src/dird
+                cp static-bacula-dir ${D}/usr/sbin/bacula-dir
+                if use gnome
+                then
+                        cd ${S}/src/gnome-console
+                        cp static-gnome-console ${D}/usr/sbin/gnome-console
+                fi
+                if use wxwindows
+                then
+                        cd ${S}/src/wx-console
+                        cp static-wx-console ${D}/usr/sbin/wx-console
+                fi
+                cd ${S}/src/stored
+                cp static-bacula-sd ${D}/usr/sbin/bacula-sd
+        fi
+
+        # the menu stuff
+        if use gnome
+        then
+        mkdir -p ${D}/usr/share/pixmaps
+        mkdir -p ${D}/usr/share/applications
+        cp ${S}/scripts/bacula.png ${D}/usr/share/pixmaps/bacula.png
+        cp ${S}/scripts/bacula.desktop.gnome2.xsu ${D}/usr/share/applications/bacula.desktop
+        cp ${S}/src/tray-monitor/generic.xpm ${D}/usr/share/pixmaps/bacula-tray-monitor.xpm
+        cp ${S}/scripts/bacula-tray-monitor.desktop \
+                ${D}/usr/share/applications/bacula-tray-monitor.desktop
+        chmod 755 ${D}/usr/sbin/bacula-tray-monitor
+        chmod 644 ${D}/etc/bacula/tray-monitor.conf
+        fi
+
+        if ! use bacula-clientonly
+        then
+                # the database update scripts
+                mkdir -p ${D}/etc/bacula/updatedb
+                cp ${S}/updatedb/* ${D}/etc/bacula/updatedb/
+                chmod 754 ${D}/etc/bacula/updatedb/*
+
+                # the logrotate configuration
+                mkdir -p ${D}/etc/logrotate.d
+                cp ${S}/scripts/logrotate ${D}/etc/logrotate.d/bacula
+                chmod 644 ${D}/etc/logrotate.d/bacula
+
+                # the logwatch scripts
+                mkdir -p ${D}/etc/log.d/conf/logfiles
+                mkdir -p ${D}/etc/log.d/conf/services
+                mkdir -p ${D}/etc/log.d/scripts/services
+                cp ${S}/scripts/logwatch/bacula ${D}/etc/log.d/scripts/services/bacula
+                cp ${S}/scripts/logwatch/logfile.bacula.conf ${D}/etc/log.d/conf/logfiles/bacula.conf
+                cp ${S}/scripts/logwatch/services.bacula.conf ${D}/etc/log.d/conf/services/bacula.conf
+                chmod 755 ${D}/etc/log.d/scripts/services/bacula
+                chmod 644 ${D}/etc/log.d/conf/logfiles/bacula.conf
+                chmod 644 ${D}/etc/log.d/conf/services/bacula.conf
+
+        fi
+
+        # the cdrom rescue package
+        mkdir -p ${D}/etc/bacula/rescue/cdrom
+        cp -R ${S}/rescue/linux/cdrom/* ${D}/etc/bacula/rescue/cdrom/
+        mkdir ${D}/etc/bacula/rescue/cdrom/bin
+        cp ${S}/src/filed/static-bacula-fd ${D}/etc/bacula/rescue/cdrom/bin/bacula-fd
+        chmod 754 ${D}/etc/bacula/rescue/cdrom/bin/bacula-fd
+
+        # documentation
+        for a in ${S}/{ChangeLog,README,ReleaseNotes,kernstodo,LICENSE,doc/latex/bacula.pdf}
+        do
+                dodoc $a
+        done
+
+        dohtml -r ${S}/doc/latex/bacula
+        
+        # clean up permissions left broken by install
+        chmod o-r ${D}/etc/bacula/query.sql
+
+        # remove the working dir so we can add it postinst with group
+        rmdir ${D}/var/bacula
+
+        # init scripts
+        exeinto /etc/init.d
+        if use bacula-clientonly
+        then
+                newexe ${S}/platforms/gentoo/bacula-fd bacula-fd
+        else
+                if use bacula-split
+                then
+                        newexe ${S}/platforms/gentoo/bacula-fd bacula-fd
+                        newexe ${S}/platforms/gentoo/bacula-sd bacula-sd
+                        newexe ${S}/platforms/gentoo/bacula-dir bacula-dir
+                else
+                        newexe ${S}/platforms/gentoo/bacula-init bacula
+                fi
+        fi
 }
 
 pkg_postinst() {
-       # create the daemon group
-       HAVE_BACULA=`cat /etc/group | grep bacula 2>/dev/null`
-       if [ -z $HAVE_BACULA ]; then
-       enewgroup bacula
-       einfo
-       einfo "The group bacula has been created. Any users you add to"
-       einfo "this group have access to files created by the daemons."
-       fi
-
-       # the working directory
-       install -m0750 -o root -g bacula -d ${ROOT}/var/bacula
-
-       # link installed bacula-fd.conf into rescue directory
-       #ln -s /etc/bacula/bacula-fd.conf /etc/bacula/rescue/cdrom/bacula-fd.conf
-       # no longer necessary after 1.36.2
-
-       einfo
-       einfo "The CDRom rescue disk package has been installed into the"
-       einfo "/etc/bacula/rescue/cdrom/ directory. Please examine the manual"
-       einfo "for information on creating a rescue CD. CDR device detection"
-       einfo "during build has been disabled to prevent sandbox violations."
-       einfo "You need to examine /etc/bacula/rescue/cdrom/Makefile and adjust"
-       einfo "the device information for your CD recorder."
-       einfo
-
-       if ! use bacula-clientonly; then
-       einfo
-       einfo "Please note either/or nature of database USE flags for"
-       einfo "Bacula.  If mysql is set, it will be used, else postgres"
-       einfo "else finally SQLite.  If you wish to have multiple DBs on"
-       einfo "one system, you may wish to unset auxillary DBs for this"
-       einfo "build."
-       einfo
-
-       if use mysql
-       then
-       # test for an existing database
-       # note: this ASSUMES no password has been set for bacula database
-       DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
-               if [ -z "$DB_VER" ]; then
-               einfo "This appears to be a new install and you plan to use mysql"
-               einfo "for your catalog database. You should now create it by doing"
-               einfo "these commands:"
-               einfo " sh /etc/bacula/grant_mysql_privileges"
-               einfo " sh /etc/bacula/create_mysql_database"
-               einfo " sh /etc/bacula/make_mysql_tables"
-               elif [ "$DB_VER" -lt "8" ]; then
-               elinfo "This release requires an upgrade to your bacula database"
-               einfo "as the database format has changed.  Please read the"
-               einfo "manual chapter for how to upgrade your database!!!"
-               einfo
-               einfo "Backup your database with the command:"
-               einfo " mysqldump -f --opt bacula | bzip2 > /var/bacula/bacula_backup.sql.bz"
-               einfo
-               einfo "Then update your database using the scripts found in"
-               einfo "/etc/bacula/updatedb/ from your current version $DB_VER to"
-               einfo "version 8. Note that scripts must be run in order from your"
-               einfo "version to the current version."
-               fi
-       fi
-
-       if use postgres
-       then
-       # test for an existing database
-       # note: this ASSUMES no password has been set for bacula database
-       DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
-               if [ -z "$DB_VER" ]; then
-               einfo "This appears to be a new install and you plan to use postgresql"
-               einfo "for your catalog database. You should now create it by doing"
-               einfo "these commands:"
-               einfo " sh /etc/bacula/create_postgresql_database"
-               einfo " sh /etc/bacula/make_postgresql_tables"
-               einfo " sh /etc/bacula/grant_postgresql_privileges"
-               elif [ "$DB_VER" -lt "8" ]; then
-               elinfo "This release requires an upgrade to your bacula database"
-               einfo "as the database format has changed.  Please read the"
-               einfo "manual chapter for how to upgrade your database!!!"
-               einfo
-               einfo "Backup your database with the command:"
-               einfo " pg_dump bacula | bzip2 > /var/bacula/bacula_backup.sql.bz2"
-               einfo
-               einfo "Then update your database using the scripts found in"
-               einfo "/etc/bacula/updatedb/ from your current version $DB_VER to"
-               einfo "version 8. Note that scripts must be run in order from your"
-               einfo "version to the current version."
-               fi
-       fi
-
-       if use sqlite
-       then
-       # test for an existing database
-       # note: this ASSUMES no password has been set for bacula database
-       DB_VER=`echo "select * from Version;" | sqlite 2>/dev/null /var/bacula/bacula.db | tail -n 1`
-               if [ -z "$DB_VER" ]; then
-               einfo "This appears to be a new install and you plan to use sqlite"
-               einfo "for your catalog database. You should now create it by doing"
-               einfo "these commands:"
-               einfo " sh /etc/bacula/grant_sqlite_privileges"
-               einfo " sh /etc/bacula/create_sqlite_database"
-               einfo " sh /etc/bacula/make_sqlite_tables"
-               elif [ "$DB_VER" -lt "8" ]; then
-               elinfo "This release requires an upgrade to your bacula database"
-               einfo "as the database format has changed.  Please read the"
-               einfo "manual chapter for how to upgrade your database!!!"
-               einfo
-               einfo "Backup your database with the command:"
-               einfo " echo .dump | sqlite /var/bacula/bacula.db | bzip2 > \\"
-               einfo "   /var/bacula/bacula_backup.sql.bz2"
-               einfo
-               einfo "Then update your database using the scripts found in"
-               einfo "/etc/bacula/updatedb/ from your current version $DB_VER to"
-               einfo "version 8. Note that scripts must be run in order from your"
-               einfo "version to the current version."
-               fi
-       fi
-       fi
-
-       einfo
-       einfo "Review your configuration files in /etc/bacula and"
-       einfo "start the daemons:"
-       if use bacula-clientonly; then
-               einfo " /etc/init.d/bacula-fd start"
-       else
-               if use bacula-split; then
-               einfo " /etc/init.d/bacula-sd start"
-               einfo " /etc/init.d/bacula-dir start"
-               einfo " /etc/init.d/bacula-fd start"
-               einfo " or /etc/bacula/bacula will start all three."
-               else
-               einfo " /etc/init.d/bacula start"
-               fi
-       fi
-       einfo
-       einfo "You may also wish to:"
-       if use bacula-clientonly; then
-               einfo " rc-update add bacula-fd default"
-       else
-               if use bacula-split; then
-                       einfo " rc-update add bacula-sd default"
-                       einfo " rc-update add bacula-dir default"
-                       einfo " rc-update add bacula-fd default"
-               else
-                       einfo " rc-update add bacula default"
-               fi
-       fi
-       einfo
+        # create the daemon group
+        HAVE_BACULA=`cat /etc/group | grep bacula 2>/dev/null`
+        if [ -z $HAVE_BACULA ]; then
+        enewgroup bacula
+        einfo
+        einfo "The group bacula has been created. Any users you add to"
+        einfo "this group have access to files created by the daemons."
+        fi
+
+        # the working directory
+        install -m0750 -o root -g bacula -d ${ROOT}/var/bacula
+
+        # link installed bacula-fd.conf into rescue directory
+        #ln -s /etc/bacula/bacula-fd.conf /etc/bacula/rescue/cdrom/bacula-fd.conf
+        # no longer necessary after 1.36.2
+
+        einfo
+        einfo "The CDRom rescue disk package has been installed into the"
+        einfo "/etc/bacula/rescue/cdrom/ directory. Please examine the manual"
+        einfo "for information on creating a rescue CD. CDR device detection"
+        einfo "during build has been disabled to prevent sandbox violations."
+        einfo "You need to examine /etc/bacula/rescue/cdrom/Makefile and adjust"
+        einfo "the device information for your CD recorder."
+        einfo
+
+        if ! use bacula-clientonly; then
+        einfo
+        einfo "Please note either/or nature of database USE flags for"
+        einfo "Bacula.  If mysql is set, it will be used, else postgres"
+        einfo "else finally SQLite.  If you wish to have multiple DBs on"
+        einfo "one system, you may wish to unset auxillary DBs for this"
+        einfo "build."
+        einfo
+
+        if use mysql
+        then
+        # test for an existing database
+        # note: this ASSUMES no password has been set for bacula database
+        DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
+                if [ -z "$DB_VER" ]; then
+                einfo "This appears to be a new install and you plan to use mysql"
+                einfo "for your catalog database. You should now create it by doing"
+                einfo "these commands:"
+                einfo " sh /etc/bacula/grant_mysql_privileges"
+                einfo " sh /etc/bacula/create_mysql_database"
+                einfo " sh /etc/bacula/make_mysql_tables"
+                elif [ "$DB_VER" -lt "8" ]; then
+                elinfo "This release requires an upgrade to your bacula database"
+                einfo "as the database format has changed.  Please read the"
+                einfo "manual chapter for how to upgrade your database!!!"
+                einfo
+                einfo "Backup your database with the command:"
+                einfo " mysqldump -f --opt bacula | bzip2 > /var/bacula/bacula_backup.sql.bz"
+                einfo
+                einfo "Then update your database using the scripts found in"
+                einfo "/etc/bacula/updatedb/ from your current version $DB_VER to"
+                einfo "version 8. Note that scripts must be run in order from your"
+                einfo "version to the current version."
+                fi
+        fi
+
+        if use postgres
+        then
+        # test for an existing database
+        # note: this ASSUMES no password has been set for bacula database
+        DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
+                if [ -z "$DB_VER" ]; then
+                einfo "This appears to be a new install and you plan to use postgresql"
+                einfo "for your catalog database. You should now create it by doing"
+                einfo "these commands:"
+                einfo " sh /etc/bacula/create_postgresql_database"
+                einfo " sh /etc/bacula/make_postgresql_tables"
+                einfo " sh /etc/bacula/grant_postgresql_privileges"
+                elif [ "$DB_VER" -lt "8" ]; then
+                elinfo "This release requires an upgrade to your bacula database"
+                einfo "as the database format has changed.  Please read the"
+                einfo "manual chapter for how to upgrade your database!!!"
+                einfo
+                einfo "Backup your database with the command:"
+                einfo " pg_dump bacula | bzip2 > /var/bacula/bacula_backup.sql.bz2"
+                einfo
+                einfo "Then update your database using the scripts found in"
+                einfo "/etc/bacula/updatedb/ from your current version $DB_VER to"
+                einfo "version 8. Note that scripts must be run in order from your"
+                einfo "version to the current version."
+                fi
+        fi
+
+        if use sqlite
+        then
+        # test for an existing database
+        # note: this ASSUMES no password has been set for bacula database
+        DB_VER=`echo "select * from Version;" | sqlite 2>/dev/null /var/bacula/bacula.db | tail -n 1`
+                if [ -z "$DB_VER" ]; then
+                einfo "This appears to be a new install and you plan to use sqlite"
+                einfo "for your catalog database. You should now create it by doing"
+                einfo "these commands:"
+                einfo " sh /etc/bacula/grant_sqlite_privileges"
+                einfo " sh /etc/bacula/create_sqlite_database"
+                einfo " sh /etc/bacula/make_sqlite_tables"
+                elif [ "$DB_VER" -lt "8" ]; then
+                elinfo "This release requires an upgrade to your bacula database"
+                einfo "as the database format has changed.  Please read the"
+                einfo "manual chapter for how to upgrade your database!!!"
+                einfo
+                einfo "Backup your database with the command:"
+                einfo " echo .dump | sqlite /var/bacula/bacula.db | bzip2 > \\"
+                einfo "   /var/bacula/bacula_backup.sql.bz2"
+                einfo
+                einfo "Then update your database using the scripts found in"
+                einfo "/etc/bacula/updatedb/ from your current version $DB_VER to"
+                einfo "version 8. Note that scripts must be run in order from your"
+                einfo "version to the current version."
+                fi
+        fi
+        fi
+
+        einfo
+        einfo "Review your configuration files in /etc/bacula and"
+        einfo "start the daemons:"
+        if use bacula-clientonly; then
+                einfo " /etc/init.d/bacula-fd start"
+        else
+                if use bacula-split; then
+                einfo " /etc/init.d/bacula-sd start"
+                einfo " /etc/init.d/bacula-dir start"
+                einfo " /etc/init.d/bacula-fd start"
+                einfo " or /etc/bacula/bacula will start all three."
+                else
+                einfo " /etc/init.d/bacula start"
+                fi
+        fi
+        einfo
+        einfo "You may also wish to:"
+        if use bacula-clientonly; then
+                einfo " rc-update add bacula-fd default"
+        else
+                if use bacula-split; then
+                        einfo " rc-update add bacula-sd default"
+                        einfo " rc-update add bacula-dir default"
+                        einfo " rc-update add bacula-fd default"
+                else
+                        einfo " rc-update add bacula default"
+                fi
+        fi
+        einfo
 }
index c8f392eea105787eb976090bcce3713369314a9f..e67cd4ce306d6ae27ac94bbc254761a5dcb80b6c 100644 (file)
@@ -1,4 +1,7 @@
 #
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
+#
 # This file is used as the template to create the
 # Makefile for the Debian GNU Hurd specific installation.
 #
index 88c13a31a1083ed2deeb0298bbbb05182406dc5e..8ea69645dfd4c90289ace2f5a66837649ea8a60c 100644 (file)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
+#
 # bacula  This shell script takes care of starting and stopping
 #        the bacula Director daemon on Debian GNU Hurd systems.
 #
@@ -47,6 +50,7 @@ if [ "x${BUSER}" != "x" ]; then
    fi
 fi
 
+RETVAL=0
 case "$1" in
    start)
       echo -n "Starting ${DESC}: "
@@ -64,6 +68,7 @@ case "$1" in
       $0 stop
       sleep 5
       $0 start
+      RETVAL=$?
       ;;
    *)
       echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
index 270950a7dd3c1a5981a605be197f39264e998ec2..b8cca0cce62eaec9e4800cbbe451dffbc6f81790 100644 (file)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
+#
 # bacula  This shell script takes care of starting and stopping
 #        the bacula Director daemon on Debian GNU Hurd systems.
 #
@@ -47,6 +50,7 @@ if [ "x${BUSER}" != "x" ]; then
    fi
 fi
 
+RETVAL=0
 case "$1" in
    start)
       echo -n "Starting ${DESC}: "
@@ -64,6 +68,7 @@ case "$1" in
       $0 stop
       sleep 5
       $0 start
+      RETVAL=$?
       ;;
    *)
       echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
index ff1ad29a8de4786ae766693b05978b0621ca3d74..9aaf2cef6111b4887f0e51536c5fa7ff1bac66d4 100644 (file)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
+#
 # bacula  This shell script takes care of starting and stopping
 #        the bacula Director daemon on Debian GNU Hurd systems.
 #
@@ -47,6 +50,7 @@ if [ "x${BUSER}" != "x" ]; then
    fi
 fi
 
+RETVAL=0
 case "$1" in
    start)
       echo -n "Starting ${DESC}: "
@@ -64,6 +68,7 @@ case "$1" in
       $0 stop
       sleep 5
       $0 start
+      RETVAL=$?
       ;;
    *)
       echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
index 88b188b8a612e5e73e34dae24d2087e5cef662b0..6e670b11d69959dc38d8ccf6cda2c4b8f8788f94 100644 (file)
@@ -1,3 +1,6 @@
+#
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
 # 
 # This file is used as the template to create the
 # Makefile for the Solaris specific installation.
index af7b0c5c1a8b2763e7f386a89036bc4560a21c5b..6f283f087486d0895f3d79e8bd17494fc4a78ffc 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Director daemon
 #
@@ -29,10 +32,11 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index 671eb4b0c2211a596f538808d17219f4ce5d1ebe..374faf956a3eb3ebc366530e539e2591c743322b 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula File daemon.
 #
@@ -9,6 +12,7 @@
 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
 #
 
+RETVAL=0
 case "$1" in
     'start')
        echo "Starting the Bacula File daemon: "
@@ -30,10 +34,11 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index 9f4e6f0c7089fa7b1f845159834ac303b2e85699..1db2740aa1266375c8885dda2c83a921c27cc878 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Storage daemon.
 #
@@ -9,6 +12,7 @@
 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
 #
 
+RETVAL=0
 case "$1" in
     start)
        echo "Starting the Bacula Storage daemon: "
@@ -28,10 +32,11 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index 1d43bbb9e627f69684de89eee018e60e4d5185de..5f58f5cb566229256d009030b664689c966e73c8 100644 (file)
@@ -1,3 +1,6 @@
+#
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
 # 
 # This file is used as the template to create the
 # Makefile for the Mandrake specific installation.
index 431244672cb8d7339acd7c6e80e8b1f063b6edc5..df82553815ca1d773d4630591c41a8cfa3b6661f 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Director daemon
 #
@@ -32,6 +35,7 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     status)
        status @sbindir@/bacula-dir
@@ -41,4 +45,4 @@ case "$1" in
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index c447fb159f451706392561317668c84639c5d441..82b3a66fc4852ee995356c63a5d9622568590809 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula File daemon.
 #
@@ -12,6 +15,7 @@
 # Source function library
 . /etc/rc.d/init.d/functions
 
+RETVAL=0
 case "$1" in
     start)
        echo -n "Starting the Bacula File daemon: "
@@ -31,6 +35,7 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     status)
        status @sbindir@/bacula-fd
@@ -40,4 +45,4 @@ case "$1" in
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index f0144dd955bf4b8ba9f10b17b506c3069a631a53..211167934d6dc223321f853163821fba6a342574 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Storage daemon.
 #
@@ -12,6 +15,7 @@
 # Source function library
 . /etc/rc.d/init.d/functions
 
+RETVAL=0
 case "$1" in
     start)
        echo -n "Starting the Bacula Storage daemon: "
@@ -31,6 +35,7 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     status)
        status @sbindir@/bacula-sd
@@ -40,4 +45,4 @@ case "$1" in
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index 8f596c29ed95108f285028c672872e5dd498f293..1c72f45e46a6e19dd5f3781a6f5828dfedbd7c78 100644 (file)
@@ -20,7 +20,7 @@ Name: %{name}
 Version: %{version}
 Release: %{release}
 Group: Archiving/Backup
-License: GPL
+License: BSD 2-Clause
 Source: http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.bz2
 Source1: %{name}-icons.tar.bz2
 BuildRoot: %{_tmppath}/%{name}-root
index 5a84037692206d0a0acaecbebf1ad55876065afb..314abc31fad30324417e3fde00210b138e39700a 100644 (file)
@@ -1,3 +1,6 @@
+#
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
 # 
 # This file is used as the template to create the
 # Makefile for the Solaris specific installation.
index af7b0c5c1a8b2763e7f386a89036bc4560a21c5b..6f283f087486d0895f3d79e8bd17494fc4a78ffc 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Director daemon
 #
@@ -29,10 +32,11 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index 2c41b343253c4b34a4f1750948d55f6ca9ebc845..f02b16db7b0e7a584e160f9ced7ab9d609c35657 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula File daemon.
 #
@@ -9,6 +12,7 @@
 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
 #
 
+RETVAL=0
 case "$1" in
     start)
        echo "Starting the Bacula File daemon: "
@@ -28,10 +32,11 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index 9f4e6f0c7089fa7b1f845159834ac303b2e85699..1db2740aa1266375c8885dda2c83a921c27cc878 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Storage daemon.
 #
@@ -9,6 +12,7 @@
 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
 #
 
+RETVAL=0
 case "$1" in
     start)
        echo "Starting the Bacula Storage daemon: "
@@ -28,10 +32,11 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL
index b0de11f813b0ffeaa6261ca63b4d3bcf46fa7a35..d98fc92420df059663b4e95c23601e44ba5a83f3 100644 (file)
@@ -1,10 +1,13 @@
 #
+# Copyright (C) Kern Sibbald 2009-2015
+# License: BSD 2-Clause
+#
 # This is the makefile template for the platform directory
 # which contains general platform installation.
 #
 #  17 August 2009 -- Lorenz Schori
 # 
-#   for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#   for Bacula Enterprise release @VERSION@ (@DATE@) -- @DISTNAME@
 #
 
 
@@ -39,8 +42,8 @@ BACULA_FD_CONF:=/Library/Preferences/bacula/bacula-fd.conf
 BACULA_WORKING_DIR:=/private/var/bacula/working
 BACULA_PMDOC:=${WORKING_DIR}/installer.pmdoc
 
-# Detect whether we sit inside the bacula source tree. In this case we won't
-# download the tar from sourceforge but instead work with what its there
+# Detect whether we sit inside the Bacula source tree. In this case we won't
+# download the tar from sourceforge but instead work with what is there
 # already
 CURSUB:=$(CURDIR:%/platforms/osx=%)
 ifneq ($(CURDIR),$(CURSUB))
@@ -49,8 +52,8 @@ ifneq ($(CURDIR),$(CURSUB))
 #      BACULA_VERSION:=$(shell sed -n 's,^VERSION=,,p' $(CURSUB)/autoconf/Make.common)
 endif
 
-PACKAGE_TITLE:=Bacula File Daemon ${BACULA_VERSION}
-PACKAGE_ID:=org.bacula.bacula-fd.pkg
+PACKAGE_TITLE:=Bacula Enterprise File Daemon ${BACULA_VERSION}
+PACKAGE_ID:=com.baculasystems.bacula-fd.pkg
 PACKAGE_DIR:=${PRODUCTS_DIR}/${PACKAGE_TITLE}
 PACKAGE_BUNDLE:=${PACKAGE_DIR}/${PACKAGE_TITLE}.pkg
 PACKAGE_DMG:=${PRODUCTS_DIR}/${PACKAGE_TITLE}.dmg
@@ -58,12 +61,18 @@ PACKAGE_RESOURCES:=ReadMe.html postflight preupgrade
 PACKAGE_XRESOURCES:=postflight preupgrade
 
 # Flags for the toolchain
-CONFIGFLAGS:=--enable-client-only --prefix=${BACULA_PREFIX} \
-    --with-dir-password=@DIR_PW@ --with-fd-password=@FD_PW@ \
-    --with-sd-password=@SD_PW@ --with-mon-dir-password=@MON_DIR_PW@ \
-    --with-mon-fd-password=@MON_FD_PW@ --with-mon-sd-password=@MON_SD_PW@ \
-    --with-basename=@BASENAME@ --with-hostname=@HOSTNAME@ \
-    --with-working-dir=${BACULA_WORKING_DIR}
+CONFIGFLAGS:= \
+  --enable-client-only \
+  --prefix=${BACULA_PREFIX} \
+  --with-dir-password=@DIR_PW@ \
+  --with-fd-password=@FD_PW@ \
+  --with-sd-password=@SD_PW@ \
+  --with-mon-dir-password=@MON_DIR_PW@ \
+  --with-mon-fd-password=@MON_FD_PW@ \
+  --with-mon-sd-password=@MON_SD_PW@ \
+  --with-basename=@BASENAME@ \
+  --with-hostname=@HOSTNAME@ \
+  --with-working-dir=${BACULA_WORKING_DIR}
 CPPFLAGS:=-isysroot ${MACOSX_SDK_SYSROOT} ${MACOSX_VERSION_FLAGS}
 CFLAGS:=-O -g ${ARCHFLAGS}
 CXXFLAGS:=${CFLAGS}
@@ -134,8 +143,8 @@ ${BACULA_DESTDIR}: ${BACULA_SOURCE}
        done
 
        mkdir -p "${BACULA_DESTDIR}${BACULA_PREFIX}/Library/LaunchDaemons"
-       sed ${INFILE_SUBST} files/org.bacula.bacula-fd.plist.in \
-               > "${BACULA_DESTDIR}${BACULA_PREFIX}/Library/LaunchDaemons/org.bacula.bacula-fd.plist"
+       sed ${INFILE_SUBST} files/com.baculasystems.bacula-fd.plist.in \
+               > "${BACULA_DESTDIR}${BACULA_PREFIX}/Library/LaunchDaemons/com.baculasystems.bacula-fd.plist"
 
 ${BACULA_SOURCE}: ${BACULA_TAR}
        mkdir -p "${WORKING_DIR}"
@@ -152,4 +161,3 @@ distclean: clean
 .PHONY: clean
 clean:
        rm -rf "${BUILD_DIR}" "${PACKAGE_DIR}" "${PACKAGE_DMG}"
-
index 44813d11e25181794ad06b6e3997d15e432e5731..4b1391d6e113b9a25c12620ce035866c2b85332f 100644 (file)
@@ -2,10 +2,10 @@ Bacula file daemon package builder for Mac OS X
 ===============================================
 
 This package build script lets you download, compile and package the bacula
-file daemon easily with a single command line. Beside the bacula file daemon
+file daemon easily with a single command line. In addition to the Bacula file daemon
 the resulting installer package contains a short ReadMe file with instructions
 on how to install and use the software. Also a basic launchd property list is
-included along with preugrade and postflight installer scripts to stop and
+included along with preupgrade and postflight installer scripts to stop and
 restart the daemon while upgrading. To ensure the security of the users the
 passwords in the configuration files are generated during a first time
 installation and file permissions are checked and corrected on upgrades.
@@ -14,7 +14,7 @@ Requirements:
 * Mac OS X 10.5 or later (building/packaging), 10.4 or later (deployment)
 * Mac OS X developer tools installed
 
-Example (compile and create package from within bacula source tree):
+Example (compile and create package from within Bacula source tree):
 $ ./configure --enable-client-only
 $ make -C platforms/osx
 
index 0c2d5e6e859b43572db852d49d2baf09d45979d8..809ab2533c0f3e22084f5a6caa04a74a2bd0b3d6 100644 (file)
@@ -1,3 +1,6 @@
+#
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
 # 
 # This file is used as the template to create the
 # Makefile for the RedHat specific installation.
index 06038560eaa64bbbb95deb9b559eeb7db8320d40..76ee60b7cfc4d62812f5ecd5f1969eb25d2f6952 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Director daemon
 #
@@ -12,6 +15,8 @@
 # Source function library
 . /etc/rc.d/init.d/functions
 
+DAEMON_OPTIONS=''
+DAEMON_USER='yes'
 DIR_USER=@dir_user@
 DIR_GROUP=@dir_group@
 DIR_OPTIONS=''
@@ -22,7 +27,7 @@ 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
+# pull in any user defined DIR_DIR_OPTIONS, DIR_USER, DIR_GROUP or DAEMON_USER
 [ -f /etc/sysconfig/bacula ] && . /etc/sysconfig/bacula
 
 #
@@ -41,8 +46,18 @@ case "$1" in
        if [ "${DIR_GROUP}" != '' ]; then
          DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}"
        fi
+
+       if [ "${DAEMON_USER}" != '' -a "${DIR_USER}" != '' ]; then
+         DIR_OPTIONS=""
+         if [ "${DIR_GROUP}" != '' ]; then
+            chown ${DIR_USER}:${DIR_GROUP} @working_dir@/bacula-dir* 2> /dev/null
+         else 
+            chown ${DIR_USER} @working_dir@/bacula-dir* 2> /dev/null
+         fi
+         DAEMON_OPTIONS="--user ${DIR_USER}"
+       fi
        echo -n "Starting Bacula Director services: "
-       daemon @sbindir@/bacula-dir $2 ${DIR_OPTIONS} -c @sysconfdir@/bacula-dir.conf
+       daemon $DAEMON_OPTIONS @sbindir@/bacula-dir $2 ${DIR_OPTIONS} -c @sysconfdir@/bacula-dir.conf
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-dir
@@ -58,6 +73,7 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     status)
        status @sbindir@/bacula-dir
index ba9445397cb0cfe66b2f647d96fcda8ccc7db1d5..2534b9e4893183e31c579dae976b74615da6ebe1 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula File daemon.
 #
@@ -12,6 +15,8 @@
 # Source function library
 . /etc/rc.d/init.d/functions
 
+DAEMON_OPTIONS=''
+DAEMON_USER='yes'
 FD_USER=@fd_user@
 FD_GROUP=@fd_group@
 FD_OPTIONS=''
@@ -41,8 +46,19 @@ case "$1" in
        if [ "${FD_GROUP}" != '' ]; then
          FD_OPTIONS="${FD_OPTIONS} -g ${FD_GROUP}"
        fi
+
+       if [ "${DAEMON_USER}" != '' -a "${FD_USER}" != '' ]; then
+         FD_OPTIONS=""
+         if [ "${FD_GROUP}" != '' ]; then
+            chown ${FD_USER}:${FD_GROUP} @working_dir@/bacula-fd* 2> /dev/null
+         else 
+            chown ${FD_USER} @working_dir@/bacula-fd* 2> /dev/null
+         fi
+         DAEMON_OPTIONS="--user ${FD_USER}"
+       fi
+
        echo -n "Starting Bacula File services: "
-       daemon @sbindir@/bacula-fd $2 ${FD_OPTIONS} -c @sysconfdir@/bacula-fd.conf
+       daemon ${DAEMON_OPTIONS} @sbindir@/bacula-fd $2 ${FD_OPTIONS} -c @sysconfdir@/bacula-fd.conf
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-fd
@@ -58,6 +74,7 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     status)
        status @sbindir@/bacula-fd
index ab5d8732c7a9546b8d21bcc08ba699624691faf8..d43d552c5ff570e7a234ccb08c32d1b8e26d539a 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Storage daemon.
 #
@@ -12,6 +15,8 @@
 # Source function library
 . /etc/rc.d/init.d/functions
 
+DAEMON_OPTIONS=''
+DAEMON_USER=yes
 SD_USER=@sd_user@
 SD_GROUP=@sd_group@
 SD_OPTIONS=''
@@ -22,7 +27,7 @@ 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
+# pull in any user defined SD_OPTIONS, SD_USER, SD_GROUP or DAEMON_USER
 [ -f /etc/sysconfig/bacula ] && . /etc/sysconfig/bacula
 
 #
@@ -41,9 +46,19 @@ case "$1" in
        if [ "${SD_GROUP}" != '' ]; then
          SD_OPTIONS="${SD_OPTIONS} -g ${SD_GROUP}"
        fi
-                                                                                     
+
+       if [ "${DAEMON_USER}" != '' -a "${SD_USER}" != '' ]; then
+         SD_OPTIONS=""
+         if [ "${SD_GROUP}" != '' ]; then
+            chown ${SD_USER}:${SD_GROUP} @working_dir@/bacula-sd* 2> /dev/null
+         else 
+            chown ${SD_USER} @working_dir@/bacula-sd* 2> /dev/null
+         fi
+         DAEMON_OPTIONS="--user ${SD_USER}"
+       fi
+
        echo -n "Starting Bacula Storage services: "
-       daemon @sbindir@/bacula-sd $2 ${SD_OPTIONS} -c @sysconfdir@/bacula-sd.conf
+       daemon $DAEMON_OPTIONS @sbindir@/bacula-sd $2 ${SD_OPTIONS} -c @sysconfdir@/bacula-sd.conf
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-sd
@@ -59,6 +74,7 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     status)
        status @sbindir@/bacula-sd
index ecdee1b2dc44e0007bb980f0f87e1466cc767057..3bf58461510bd3d33df661ea03b1337960ca6dc3 100644 (file)
@@ -1,3 +1,6 @@
+#
+# Copyright (C) Kern Sibbald 2003-2015
+# License: BSD 2-Clause
 # 
 # This file is used as the template to create the
 # Makefile for the Slackware specific installation.
index f9ef20bb5f3371f8ad997985b766f5462e4e7eb0..0e36cbc73910aae1ada56f5ebe16059c6c39887c 100644 (file)
@@ -1,7 +1,10 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
-#             the bacula daemons.
+#              the bacula daemons.
 #
 #   This is pretty much watered down version of the RedHat script
 #   that works on Solaris as well as Linux, but it won't work everywhere.
@@ -40,17 +43,17 @@ killproc() {
     RC=0
     # Test syntax.
     if [ $# = 0 ]; then
-       echo "Usage: killproc {program} [signal]"
-       return 1
+        echo "Usage: killproc {program} [signal]"
+        return 1
     fi
 
     notset=0
     # check for third arg to be kill level
     if [ "$3" != "" ] ; then
-       killlevel=$3
+        killlevel=$3
     else
-       notset=1
-       killlevel="-9"
+        notset=1
+        killlevel="-9"
     fi
 
     # Get base program name
@@ -61,39 +64,39 @@ killproc() {
 
     # Kill it.
     if [ "$pid" != "" ] ; then
-       if [ "$notset" = "1" ] ; then
-           if ps -p $pid>/dev/null 2>&1; then
-               # TERM first, then KILL if not dead
-               kill -TERM $pid 2>/dev/null
-               sleep 1
-               if ps -p $pid >/dev/null 2>&1 ; then
-                   sleep 1
-                   if ps -p $pid >/dev/null 2>&1 ; then
-                       sleep 3
-                       if ps -p $pid >/dev/null 2>&1 ; then
-                           kill -KILL $pid 2>/dev/null
-                       fi
-                   fi
-               fi
-            fi
-            ps -p $pid >/dev/null 2>&1
-            RC=$?
-            [ $RC -eq 0 ] && failure "$base shutdown" || success "$base shutdown"
-       #    RC=$((! $RC))
-       # use specified level only
-       else
-           if ps -p $pid >/dev/null 2>&1; then
-               kill $killlevel $pid 2>/dev/null
-               RC=$?
-               [ $RC -eq 0 ] && success "$base $killlevel" || failure "$base $killlevel"
-           fi
-       fi
+        if [ "$notset" = "1" ] ; then
+            if ps -p $pid>/dev/null 2>&1; then
+                # TERM first, then KILL if not dead
+                kill -TERM $pid 2>/dev/null
+                sleep 1
+                if ps -p $pid >/dev/null 2>&1 ; then
+                    sleep 1
+                    if ps -p $pid >/dev/null 2>&1 ; then
+                        sleep 3
+                        if ps -p $pid >/dev/null 2>&1 ; then
+                            kill -KILL $pid 2>/dev/null
+                        fi
+                    fi
+                fi
+             fi
+             ps -p $pid >/dev/null 2>&1
+             RC=$?
+             [ $RC -eq 0 ] && failure "$base shutdown" || success "$base shutdown"
+        #    RC=$((! $RC))
+        # use specified level only
+        else
+            if ps -p $pid >/dev/null 2>&1; then
+                kill $killlevel $pid 2>/dev/null
+                RC=$?
+                [ $RC -eq 0 ] && success "$base $killlevel" || failure "$base $killlevel"
+            fi
+        fi
     else
-       failure "$base shutdown"
+        failure "$base shutdown"
     fi
     # Remove pid file if any.
     if [ "$notset" = "1" ]; then
-       rm -f ${PIDDIR}/$base.$2.pid
+        rm -f ${PIDDIR}/$base.$2.pid
     fi
     return $RC
 }
@@ -103,8 +106,8 @@ pidofproc() {
     pid=""
     # Test syntax.
     if [ $# = 0 ] ; then
-       echo "Usage: pidofproc {program}"
-       return 1
+        echo "Usage: pidofproc {program}"
+        return 1
     fi
 
     # Get base program name
@@ -112,11 +115,11 @@ pidofproc() {
 
     # First try PID file
     if [ -f ${PIDDIR}/$base.$2.pid ] ; then
-       pid=`head -1 ${PIDDIR}/$base.$2.pid`
-       if [ "$pid" != "" ] ; then
-           echo $pid
-           return 0
-       fi
+        pid=`head -1 ${PIDDIR}/$base.$2.pid`
+        if [ "$pid" != "" ] ; then
+            echo $pid
+            return 0
+        fi
     fi
 
     # Next try "pidof"
@@ -136,8 +139,8 @@ pidofproc() {
 status() {
     # Test syntax.
     if [ $# = 0 ] ; then
-       echo "Usage: status {program}"
-       return 1
+        echo "Usage: status {program}"
+        return 1
     fi
 
     # Get base program name
@@ -152,27 +155,27 @@ status() {
        return 0
    else
        pid=`${PSCMD} | awk 'BEGIN { prog=ARGV[1]; ARGC=1 } 
-            { if ((prog == $2) || (("(" prog ")") == $2) ||
-                 (("[" prog "]") == $2) ||
-                 ((prog ":") == $2)) { print $1 ; exit 0 } }' $1`
+             { if ((prog == $2) || (("(" prog ")") == $2) ||
+                  (("[" prog "]") == $2) ||
+                  ((prog ":") == $2)) { print $1 ; exit 0 } }' $1`
        if [ "$pid" != "" ] ; then
-          echo "$base (pid $pid) is running..."
-          return 0
+           echo "$base (pid $pid) is running..."
+           return 0
        fi
    fi
 
     # Next try the PID files
     if [ -f ${PIDDIR}/$base.$2.pid ] ; then
-       pid=`head -1 ${PIDDIR}/$base.$2.pid`
-       if [ "$pid" != "" ] ; then
-           echo "$base not running, but pid file exists"
-           return 1
-       fi
+        pid=`head -1 ${PIDDIR}/$base.$2.pid`
+        if [ "$pid" != "" ] ; then
+            echo "$base not running, but pid file exists"
+            return 1
+        fi
     fi
     # See if the subsys lock exists
     if [ -f ${SUBSYSDIR}/$base ] ; then
-       echo "$base not running, but subsys locked"
-       return 2
+        echo "$base not running, but subsys locked"
+        return 2
     fi
     echo "$base is stopped"
     return 3
index 3a613a9e7ec93f0615085cab57d2844b2013a4c8..cfd4f3fff80b6c690210359cddbb27e58dcc833c 100644 (file)
@@ -1,7 +1,10 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
-#             the bacula Director daemon
+#              the bacula Director daemon
 #
 # chkconfig: 2345 92 99
 # description: The Leading Open Source Backup Solution.
 # Source function library
 . /etc/rc.d/functions.bacula
 
+RETVAL=0
 case "$1" in
     start)
-       [ -x ${BACDIRBIN}/bacula-dir ] && { 
-           sleep 2
-           echo -n "Starting the Director daemon: "
-           OPTIONS=''
-           if [ "${DIR_USER}" != '' ]; then
-              OPTIONS="${OPTIONS} -u ${DIR_USER}"
-           fi
+        [ -x ${BACDIRBIN}/bacula-dir ] && { 
+            sleep 2
+            echo -n "Starting the Director daemon: "
+            OPTIONS=''
+            if [ "${DIR_USER}" != '' ]; then
+               OPTIONS="${OPTIONS} -u ${DIR_USER}"
+            fi
 
-           if [ "${DIR_GROUP}" != '' ]; then
-              OPTIONS="${OPTIONS} -g ${DIR_GROUP}"
-           fi
+            if [ "${DIR_GROUP}" != '' ]; then
+               OPTIONS="${OPTIONS} -g ${DIR_GROUP}"
+            fi
 
-           ${BACDIRBIN}/bacula-dir $2 ${OPTIONS} -v -c ${BACDIRCFG}/bacula-dir.conf
-           echo Done.
-       }
-       ;;
+            ${BACDIRBIN}/bacula-dir $2 ${OPTIONS} -v -c ${BACDIRCFG}/bacula-dir.conf
+            RETVAL=$?
+            echo Done.
+        }
+        ;;
     stop)
-       [ -x ${BACDIRBIN}/bacula-dir ] && {
-           echo -n "Stopping the Director daemon: "
-           killproc ${BACDIRBIN}/bacula-dir ${DIR_PORT}
-           echo Done.
-       }
-       ;;
+        [ -x ${BACDIRBIN}/bacula-dir ] && {
+            echo -n "Stopping the Director daemon: "
+            killproc ${BACDIRBIN}/bacula-dir ${DIR_PORT}
+            RETVAL=$?
+            echo Done.
+        }
+        ;;
     restart)
-       $0 stop
-       sleep 5
-       $0 start
-       ;;
+        $0 stop
+        sleep 5
+        $0 start
+        RETVAL=$?
+        ;;
     status)
-       [ -x ${BACDIRBIN}/bacula-dir ] && status ${BACDIRBIN}/bacula-dir ${DIR_PORT}
-       ;;
+        [ -x ${BACDIRBIN}/bacula-dir ] && status ${BACDIRBIN}/bacula-dir ${DIR_PORT}
+        RETVAL=$?
+        ;;
     *)
-       echo "Usage: $0 {start|stop|restart|status}"
-       exit 1
-       ;;
+        echo "Usage: $0 {start|stop|restart|status}"
+        exit 1
+        ;;
 esac
-exit 0
+exit $RETVAL
index 99a3c2db957ee39405b913818cb8cbe15372fcdc..d2a66503ae17686c2818f0dbe306f9ba920d1e16 100644 (file)
@@ -1,7 +1,10 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
-#             the bacula File daemon.
+#              the bacula File daemon.
 #
 # chkconfig: 2345 91 99
 # description: The Leading Open Source Backup Solution.
 # Source function library
 . /etc/rc.d/functions.bacula
 
+RETVAL=0
 case "$1" in
     start)
-       [ -x ${BACFDBIN}/bacula-fd ] && { 
-           sleep 2
-           echo -n "Starting the File daemon: "
-           OPTIONS=''
-           if [ "${FD_USER}" != '' ]; then
-              OPTIONS="${OPTIONS} -u ${FD_USER}"
-           fi
+        [ -x ${BACFDBIN}/bacula-fd ] && { 
+            sleep 2
+            echo -n "Starting the File daemon: "
+            OPTIONS=''
+            if [ "${FD_USER}" != '' ]; then
+               OPTIONS="${OPTIONS} -u ${FD_USER}"
+            fi
 
-           if [ "${FD_GROUP}" != '' ]; then
-              OPTIONS="${OPTIONS} -g ${FD_GROUP}"
-           fi
+            if [ "${FD_GROUP}" != '' ]; then
+               OPTIONS="${OPTIONS} -g ${FD_GROUP}"
+            fi
 
-           ${BACFDBIN}/bacula-fd $2 ${OPTIONS} -v -c ${BACFDCFG}/bacula-fd.conf
-           echo Done.
-       }
-       ;;
+            ${BACFDBIN}/bacula-fd $2 ${OPTIONS} -v -c ${BACFDCFG}/bacula-fd.conf
+            RETVAL=$?
+            echo Done.
+        }
+        ;;
     stop)
-       [ -x ${BACFDBIN}/bacula-fd ] && {
-           echo -n "Stopping the File daemon: "
-           killproc ${BACFDBIN}/bacula-fd ${FD_PORT}
-           echo Done.
-       }
-       ;;
+        [ -x ${BACFDBIN}/bacula-fd ] && {
+            echo -n "Stopping the File daemon: "
+            killproc ${BACFDBIN}/bacula-fd ${FD_PORT}
+            RETVAL=$?
+            echo Done.
+        }
+        ;;
     restart)
-       $0 stop
-       sleep 5
-       $0 start
-       ;;
+        $0 stop
+        sleep 5
+        $0 start
+        RETVAL=$?
+        ;;
     status)
-       [ -x ${BACFDBIN}/bacula-fd ] && status ${BACFDBIN}/bacula-fd ${FD_PORT}
-       ;;
+        [ -x ${BACFDBIN}/bacula-fd ] && status ${BACFDBIN}/bacula-fd ${FD_PORT}
+        RETVAL=$?
+        ;;
     *)
-       echo "Usage: $0 {start|stop|restart|status}"
-       exit 1
-       ;;
+        echo "Usage: $0 {start|stop|restart|status}"
+        exit 1
+        ;;
 esac
-exit 0
+exit $RETVAL
index 9c77a6ab7ec5288efcab4c0935b6c98539466b0b..8841e5b2b65782c46db35ecb5d9a1b4515937026 100644 (file)
@@ -1,7 +1,10 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
-#             the bacula Storage daemon.
+#              the bacula Storage daemon.
 #
 # chkconfig: 2345 90 99
 # description: The Leading Open Source Backup Solution.
 # Source function library
 . /etc/rc.d/functions.bacula
 
+RETVAL=0
 case "$1" in
     start)
-       [ -x ${BACSDBIN}/bacula-sd ] && { 
-           sleep 2
-           echo -n "Starting the Storage daemon: "
-           OPTIONS=''
-           if [ "${SD_USER}" != '' ]; then
-              OPTIONS="${OPTIONS} -u ${SD_USER}"
-           fi
+        [ -x ${BACSDBIN}/bacula-sd ] && { 
+            sleep 2
+            echo -n "Starting the Storage daemon: "
+            OPTIONS=''
+            if [ "${SD_USER}" != '' ]; then
+               OPTIONS="${OPTIONS} -u ${SD_USER}"
+            fi
 
-           if [ "${SD_GROUP}" != '' ]; then
-              OPTIONS="${OPTIONS} -g ${SD_GROUP}"
-           fi
+            if [ "${SD_GROUP}" != '' ]; then
+               OPTIONS="${OPTIONS} -g ${SD_GROUP}"
+            fi
 
-           ${BACSDBIN}/bacula-sd $2 ${OPTIONS} -v -c ${BACSDCFG}/bacula-sd.conf
-           echo Done.
-       }
-       ;;
+            ${BACSDBIN}/bacula-sd $2 ${OPTIONS} -v -c ${BACSDCFG}/bacula-sd.conf
+            RETVAL=$?
+            echo Done.
+        }
+        ;;
     stop)
-       [ -x ${BACSDBIN}/bacula-sd ] && {
-           echo -n "Stopping the Storage daemon: "
-           killproc ${BACSDBIN}/bacula-sd ${SD_PORT}
-           echo Done.
-       }
-       ;;
+        [ -x ${BACSDBIN}/bacula-sd ] && {
+            echo -n "Stopping the Storage daemon: "
+            killproc ${BACSDBIN}/bacula-sd ${SD_PORT}
+            RETVAL=$?
+            echo Done.
+        }
+        ;;
     restart)
-       $0 stop
-       sleep 5
-       $0 start
-       ;;
+        $0 stop
+        sleep 5
+        $0 start
+        RETVAL=$?
+        ;;
     status)
-       [ -x ${BACSDBIN}/bacula-sd ] && status ${BACSDBIN}/bacula-sd ${SD_PORT}
-       ;;
+        [ -x ${BACSDBIN}/bacula-sd ] && status ${BACSDBIN}/bacula-sd ${SD_PORT}
+        RETVAL=$?
+        ;;
     *)
-       echo "Usage: $0 {start|stop|restart|status}"
-       exit 1
-       ;;
+        echo "Usage: $0 {start|stop|restart|status}"
+        exit 1
+        ;;
 esac
-exit 0
-
+exit $RETVAL
index 4347e4707b1dc007ea35cefa174d3c0f31458bf3..0e58d39e40e37ce55bf657fb4b36c21b5ca1cccd 100644 (file)
@@ -1,3 +1,6 @@
+#
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
 # 
 # This file is used as the template to create the
 # Makefile for the Solaris specific installation.
@@ -12,7 +15,6 @@
 
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DIR = $(INSTALL) -d -m 755
 
 nothing:
 
@@ -20,28 +22,62 @@ install: install-autostart
 
 install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir
 
-install-autostart-%:
-       @rm -f $(DESTDIR)/etc/rc0.d/K20bacula-$*
-       @rm -f $(DESTDIR)/etc/rc1.d/S99bacula-$*
-       @rm -f $(DESTDIR)/etc/rc2.d/S99bacula-$*
-       @$(INSTALL_DIR) $(DESTDIR)/etc/init.d
-       @$(INSTALL_DIR) $(DESTDIR)/etc/rc0.d $(DESTDIR)/etc/rc1.d \
-               $(DESTDIR)/etc/rc2.d
-       @$(INSTALL_PROGRAM) -m 744 bacula-$* $(DESTDIR)/etc/init.d/bacula-$*
+       
+install-autostart-fd:
+       @rm -f /etc/rc0.d/K20bacula-fd
+       @rm -f /etc/rc1.d/S99bacula-fd
+       @rm -f /etc/rc2.d/S99bacula-fd
+       @$(INSTALL_PROGRAM) -m 744 bacula-fd /etc/init.d/bacula-fd
+       # set symlinks for script at startup and shutdown
+       @ln -f -s /etc/init.d/bacula-fd /etc/rc0.d/K20bacula-fd
+       @ln -f -s /etc/init.d/bacula-fd /etc/rc1.d/S99bacula-fd
+       @ln -f -s /etc/init.d/bacula-fd /etc/rc2.d/S99bacula-fd
+
+
+install-autostart-sd:
+       @rm -f /etc/rc0.d/K20bacula-sd
+       @rm -f /etc/rc1.d/S99bacula-sd
+       @rm -f /etc/rc2.d/S99bacula-sd
+       @$(INSTALL_PROGRAM) -m 744 bacula-sd /etc/init.d/bacula-sd
        # set symlinks for script at startup and shutdown
-       @ln -f -s /etc/init.d/bacula-$* $(DESTDIR)/etc/rc0.d/K20bacula-$*
-       @ln -f -s /etc/init.d/bacula-$* $(DESTDIR)/etc/rc1.d/S99bacula-$*
-       @ln -f -s /etc/init.d/bacula-$* $(DESTDIR)/etc/rc2.d/S99bacula-$*
+       @ln -f -s /etc/init.d/bacula-sd /etc/rc0.d/K20bacula-sd
+       @ln -f -s /etc/init.d/bacula-sd /etc/rc1.d/S99bacula-sd
+       @ln -f -s /etc/init.d/bacula-sd /etc/rc2.d/S99bacula-sd
+
+
+install-autostart-dir:
+       @rm -f /etc/rc0.d/K20bacula-dir
+       @rm -f /etc/rc1.d/S99bacula-dir
+       @rm -f /etc/rc2.d/S99bacula-dir
+       @$(INSTALL_PROGRAM) -m 744 bacula-dir /etc/init.d/bacula-dir
+       # set symlinks for script at startup and shutdown
+       @ln -f -s /etc/init.d/bacula-dir /etc/rc0.d/K20bacula-dir
+       @ln -f -s /etc/init.d/bacula-dir /etc/rc1.d/S99bacula-dir
+       @ln -f -s /etc/init.d/bacula-dir /etc/rc2.d/S99bacula-dir
+
 
 uninstall: uninstall-autostart
 
 uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir
 
-uninstall-autostart-%:
-       @rm -f $(DESTDIR)/etc/rc0.d/K20bacula-$*
-       @rm -f $(DESTDIR)/etc/rc1.d/S99bacula-$*
-       @rm -f $(DESTDIR)/etc/rc2.d/S99bacula-$*
-       @rm -f $(DESTDIR)/etc/init.d/bacula-$*
+uninstall-autostart-fd:
+       @rm -f /etc/rc0.d/K20bacula-fd
+       @rm -f /etc/rc1.d/S99bacula-fd
+       @rm -f /etc/rc2.d/S99bacula-fd
+       @rm -f /etc/init.d/bacula-fd
+
+
+uninstall-autostart-sd:
+       @rm -f /etc/rc0.d/K20bacula-sd
+       @rm -f /etc/rc1.d/S99bacula-sd
+       @rm -f /etc/rc2.d/S99bacula-sd
+       @rm -f /etc/init.d/bacula-sd
+
+uninstall-autostart-dir:
+       @rm -f /etc/rc0.d/K20bacula-dir
+       @rm -f /etc/rc1.d/S99bacula-dir
+       @rm -f /etc/rc2.d/S99bacula-dir
+       @rm -f /etc/init.d/bacula-dir
 
 clean:
        @rm -f 1 2 3
index 84df47ecfaff14bc2204ba6d0f3085ef646f8641..05fc64cca81c20342c04a21928600ac406af5e4e 100755 (executable)
@@ -1,5 +1,8 @@
 #!/bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Director daemon
 #
@@ -15,12 +18,12 @@ DIR_OPTIONS=''
 case "$1" in
     start)
        if [ ! -z "${DIR_USER}" ]; then
-          [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-u ${DIR_USER}" || \
-                                     DIR_OPTIONS="${DIR_OPTIONS} -u ${DIR_USER}"
+         [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-u ${DIR_USER}" || \
+                                    DIR_OPTIONS="${DIR_OPTIONS} -u ${DIR_USER}"
        fi
        if [ ! -z "${DIR_GROUP}" ]; then
-          [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-g ${DIR_GROUP}" || \
-                                     DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}"
+         [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-g ${DIR_GROUP}" || \
+                                    DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}"
        fi
 
        echo "Starting the Bacula Director: "
@@ -29,16 +32,16 @@ case "$1" in
     stop)
        echo "Stopping the Director daemon: "
        if [ -x /usr/bin/zonename ]; then
-          case `/usr/bin/zonename` in
-             global)
-                pkill -z global -x bacula-dir
-                ;;
-             *)
-                pkill -x bacula-dir
-                ;;
-          esac
+         case `/usr/bin/zonename` in
+            global)
+               pkill -z global -x bacula-dir
+               ;;
+            *)
+               pkill -x bacula-dir
+               ;;
+         esac
        else
-          pkill -x bacula-dir
+         pkill -x bacula-dir
        fi
        ;;
     restart)
index a9eb2044b151831b6169697183dbb6e976118e61..0dca5b4f371741ab84f150160da9333d4f6562db 100755 (executable)
@@ -1,5 +1,8 @@
 #!/bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula File daemon.
 #
@@ -15,12 +18,12 @@ FD_OPTIONS=''
 case "$1" in
     start)
        if [ ! -z "${DIR_USER}" ]; then
-          [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-u ${DIR_USER}" || \
-                                     DIR_OPTIONS="${DIR_OPTIONS} -u ${DIR_USER}"
+         [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-u ${DIR_USER}" || \
+                                    DIR_OPTIONS="${DIR_OPTIONS} -u ${DIR_USER}"
        fi
        if [ ! -z "${DIR_GROUP}" ]; then
-          [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-g ${DIR_GROUP}" || \
-                                     DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}"
+         [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-g ${DIR_GROUP}" || \
+                                    DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}"
        fi
 
        echo "Starting the Bacula File daemon: "
@@ -29,16 +32,16 @@ case "$1" in
     stop)
        echo "Stopping the Bacula File daemon: "
        if [ -x /usr/bin/zonename ]; then
-          case `/usr/bin/zonename` in
-             global)
-                pkill -z global -x bacula-fd
-                ;;
-             *)
-                pkill -x bacula-fd
-                ;;
-          esac
+         case `/usr/bin/zonename` in
+            global)
+               pkill -z global -x bacula-fd
+               ;;
+            *)
+               pkill -x bacula-fd
+               ;;
+         esac
        else
-          pkill -x bacula-fd
+         pkill -x bacula-fd
        fi
        ;;
     restart)
index 752579e1cb7e77ed7b867b7fb79a357fad6e0a88..876ad4bbca731b2700aeb971c6d9d7895a0836e8 100755 (executable)
@@ -1,5 +1,8 @@
 #!/bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Storage daemon.
 #
@@ -15,12 +18,12 @@ SD_OPTIONS=''
 case "$1" in
     start)
        if [ ! -z "${DIR_USER}" ]; then
-          [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-u ${DIR_USER}" || \
-                                     DIR_OPTIONS="${DIR_OPTIONS} -u ${DIR_USER}"
+         [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-u ${DIR_USER}" || \
+                                    DIR_OPTIONS="${DIR_OPTIONS} -u ${DIR_USER}"
        fi
        if [ ! -z "${DIR_GROUP}" ]; then
-          [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-g ${DIR_GROUP}" || \
-                                     DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}"
+         [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-g ${DIR_GROUP}" || \
+                                    DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}"
        fi
 
        echo "Starting the Bacula Storage daemon: "
@@ -29,16 +32,16 @@ case "$1" in
     stop)
        echo "Stopping the Bacula Storage daemon: "
        if [ -x /usr/bin/zonename ]; then
-          case `/usr/bin/zonename` in
-             global)
-                pkill -z global -x bacula-sd
-                ;;
-             *)
-                pkill -x bacula-sd
-                ;;
-          esac
+         case `/usr/bin/zonename` in
+            global)
+               pkill -z global -x bacula-sd
+               ;;
+            *)
+               pkill -x bacula-sd
+               ;;
+         esac
        else
-          pkill -x bacula-sd
+         pkill -x bacula-sd
        fi
        ;;
     restart)
index f4bbc6738a70feed36cc2bbeff5c368af5d2c4dd..4abc3f46aa90574ae1da91bf1409d1ea9b467477 100644 (file)
@@ -1,3 +1,6 @@
+#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
 # 
 # This file is used as the template to create the
 # Makefile for the SuSe specific installation.
index fc995cb4507c40059f2ffebd1183b608cb5a35d5..0278de854bbd9ba92438715ac4d61acaef0a6037 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Director daemon
 #
 # description: The Leading Open Source Backup Solution.
 #
 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
-# Copyright (C) 2011 Free Software Foundation Europe e.V.
 # Modified to work on SuSE 1/31/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
 # Added rc.status functions 3/13/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
 # Added LSB init info 10/14/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
-# Added $remote_fs, add bacula specific daemon user & group Bruno Friedmann <bruno@ioda-net.ch>
 #
 ### BEGIN INIT INFO
 # Provides:                    bacula-dir
-# Required-Start:      $local_fs $remote_fs $network
-# Required-Stop:       $local_fs $remote_fs $network
-# Default-Start:       3 5
+# Required-Start:              $local_fs $network @DEFAULT_DB_TYPE@
+# Required-Stop:               $local_fs $network @DEFAULT_DB_TYPE@
+# Default-Start:               3 5
 # Default-Stop:        0 1 2 6
 # Short-Description:   bacula director
 # Description:                 Bacula network backup system director daemon
@@ -31,7 +32,7 @@ RETVAL=0
 case "$1" in
     start)
        echo -n "Starting the Bacula Director: "
-       /sbin/startproc @sbindir@/bacula-dir $2 -u @dir_user@ -g @dir_group@ -c @sysconfdir@/bacula-dir.conf
+       /sbin/startproc @sbindir@/bacula-dir $2 -c @sysconfdir@/bacula-dir.conf
        RETVAL=$?
        rc_status -v
        echo
@@ -49,6 +50,7 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     status)
        /sbin/checkproc @sbindir@/bacula-dir
index e8618ddf556d6a14b9aa37de0939a5bdc1002315..6bfdf3371661b47e3aed8e1037de7509bc575eaa 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula File daemon.
 #
 # description: The Leading Open Source Backup Solution.
 #
 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
-# Copyright (C) 2011 Free Software Foundation Europe e.V.
 # Modified to work on SuSE 1/31/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
 # Added rc.status functions 3/13/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
 # Added LSB init info 10/14/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
-# Added $remote_fs, add bacula specific daemon user & group Bruno Friedmann <bruno@ioda-net.ch>
 #
 ### BEGIN INIT INFO
 # Provides:                    bacula-fd
-# Required-Start:      $local_fs $remote_fs $network
-# Required-Stop:       $local_fs $remote_fs $network
-# Default-Start:       3 5
+# Required-Start:              $local_fs $network
+# Required-Stop:               $local_fs $network
+# Default-Start:               3 5
 # Default-Stop:        0 1 2 6
 # Short-Description:   bacula file daemon
 # Description:                 Bacula network backup system file daemon
 # this gives us funtion rc_status -v to tell us if we succeed or fail
 . /etc/rc.status
 
+RETVAL=0
 case "$1" in
     start)
        echo -n "Starting the Bacula File daemon: "
-       /sbin/startproc @sbindir@/bacula-fd $2 -u @fd_user@  -g @fd_group@  -c @sysconfdir@/bacula-fd.conf
+       /sbin/startproc @sbindir@/bacula-fd $2 -c @sysconfdir@/bacula-fd.conf
        RETVAL=$?
        rc_status -v
        echo
@@ -48,6 +50,7 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     status)
        /sbin/checkproc @sbindir@/bacula-fd
index 7a61784d585ad3344d3b17e33acebc77c22f6457..161e66163438767b29245c3dbb817d848e466b61 100755 (executable)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Storage daemon.
 #
 # description: The Leading Open Source Backup Solution.
 #
 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
-# Copyright (C) 2011 Free Software Foundation Europe e.V.
 # Modified to work on SuSE 1/31/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
 # Added rc.status functions 3/13/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
 # Added LSB init info 10/14/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
-# Added $remote_fs, add bacula specific daemon user & group Bruno Friedmann <bruno@ioda-net.ch>
 #
 ### BEGIN INIT INFO
 # Provides:                    bacula-sd
-# Required-Start:              $local_fs $remote_fs $network
-# Required-Stop:               $local_fs $remote_fs $network
+# Required-Start:              $local_fs $network
+# Required-Stop:               $local_fs $network
 # Default-Start:               3 5
 # Default-Stop:        0 1 2 6
 # Short-Description:   bacula storage daemon
 # this gives us funtion rc_status -v to tell us if we succeed or fail
 . /etc/rc.status
 
+RETVAL=0
 case "$1" in
     start)
        echo -n "Starting the Bacula Storage daemon: "
-       /sbin/startproc @sbindir@/bacula-sd $2 -u @sd_user@ -g @sd_group@ -c @sysconfdir@/bacula-sd.conf
+       /sbin/startproc @sbindir@/bacula-sd $2 -c @sysconfdir@/bacula-sd.conf
        RETVAL=$?
        rc_status -v
        echo
@@ -48,6 +50,7 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     status)
        /sbin/checkproc @sbindir@/bacula-sd
index 6907794ac267df6712e3b6cee539b2b433905c66..4b1bfc84cfe47ec362d7af392ef975acc69aac9e 100644 (file)
@@ -1,5 +1,8 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula daemons.
 #
index c3da39c3472d3516178edb235847cc15e19b7ba2..fc64683902a9b7a55bcf2a5b41feb35afb5adf90 100644 (file)
@@ -1,4 +1,7 @@
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # This file is used as the template to create the
 # Makefile for the systemd specific installation.
 #
@@ -17,7 +20,7 @@ nothing:
 
 install: install-dir install-conf install-autostart
 
-install-dir: $(DESTDIR)/$(SYSTEMD_UNITDIR)
+install-dir:
        mkdir -p $(DESTDIR)/$(SYSTEMD_UNITDIR) $(DESTDIR)/$(SYSTEMD_TMPFILES)
 
 install-conf:
@@ -25,6 +28,10 @@ install-conf:
 
 install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir
 
+install-service:
+       @$(INSTALL_PROGRAM) -m 644 bacula-fd.service $(DESTDIR)/$(SYSTEMD_UNITDIR)
+       @$(INSTALL_PROGRAM) -m 644 bacula-dir.service $(DESTDIR)/$(SYSTEMD_UNITDIR)
+       @$(INSTALL_PROGRAM) -m 644 bacula-sd.service $(DESTDIR)/$(SYSTEMD_UNITDIR)
 
 install-autostart-fd:
        @if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-fd.service; then \
@@ -104,4 +111,3 @@ distclean: clean
 devclean: clean
        @rm -f Makefile bacula-*.spec bacula.*.spec bacula.spec
        @rm -f bacula.conf bacula-sd.service bacula-fd.service bacula-dir.service
-
index 9a82532e2924f74be66c86e51ea9983fd84280b1..77921f37f4cfb431dbb9e8a27a18ca3305667226 100644 (file)
@@ -1,39 +1,35 @@
-# This file is part of package Bacula Director Daemon
+# Systemd Bacula Enterprise service file
+#
+# Copyright (C) Kern Sibbald 2011-2015
+# License: BSD 2-Clause
+#
+# /lib/systemd/system/bacula-dir.service
 #
-# Copyright (c) 2011 Free Software Foundation Europe e.V.
-# Bacula Community
-# Author: Bruno Friedmann
 # Description:
-#    Used to start the bacula director daemon service (bacula-dir)
-#     will be installed as /lib/systemd/system/bacula-dir.service
-#    enable : systemctl enable bacula-dir.service
-#       start : systemctl start bacula-dir.service
+#    Used to start/stop/reload the bacula director daemon service (bacula-dir)
+#
+#    enable : systemctl enable bacula-dir
+#    start : systemctl start bacula-dir
 #
-# Bacula Director Daemon service
 #
+
+# From http://www.freedesktop.org/software/systemd/man/systemd.unit.html
 [Unit]
-Description=Bacula Director Daemon service
-Alias=bacula-dir
-Requires=var-run.mount nss-lookup.target network.target remote-fs.target syslog.target time-sync.target
-After=var-run.mount nss-lookup.target network.target remote-fs.target syslog.target time-sync.target
-# Dependency about the database
-# We let administrators decide if they need it (if local db instance)
-# Wants=@DEFAULT_DB_TYPE@.service
-# Check if working dir exist and is a directory
-ConditionPathIsDirectory=@working_dir@
-# Before=
-# Conflicts=
+Description=Bacula Enterprise Director Daemon service
+Requires=network.target
+After=network.target
+RequiresMountsFor=@working_dir@ @sysconfdir@ @sbindir@ @piddir@
 
+# From http://www.freedesktop.org/software/systemd/man/systemd.service.html
 [Service]
 Type=forking
 User=@dir_user@
 Group=@dir_group@
-PIDFile=@piddir@/bacula-dir.@dir_port@.pid
-# EnvironmentFile=-/etc/sysconfig/bacula-dir
-StandardOutput=syslog
 ExecStart=@sbindir@/bacula-dir -c @sysconfdir@/bacula-dir.conf
-# This daemon should be able to reload the conf file
-#ExecReload=/sbin/killproc -p @piddir@/bacula-dir.pid -HUP @sbindir@/bacula-dir
+PIDFile=@piddir@/bacula-dir.@dir_port@.pid
+ExecReload=@sbindir@/bacula-dir -t -c @sysconfdir@/bacula-dir.conf
+ExecReload=/bin/kill -HUP $MAINPID
+StandardError=syslog
 
 [Install]
 WantedBy=multi-user.target
index 3efb25662837ce42b67b13fe3275d917b9500381..ae80bb2acf27a8f2cdf12b8ba596ff5ce024f1ac 100644 (file)
@@ -1,31 +1,33 @@
-# This file is part of package Bacula File Daemon
+# Systemd Bacula Enterprise service file
+#
+# Copyright (C) Kern Sibbald 2011-2015
+# License: BSD 2-Clause
+#
+# /lib/systemd/system/bacula-fd.service
 #
-# Copyright (c) 2011 Free Software Foundation Europe e.V.
-# Bacula Community
-# Author: Bruno Friedmann
 # Description:
 #    Used to start the bacula file daemon service (bacula-fd)
-#    will be installed as /lib/systemd/system/bacula-fd.service
-#    enable : systemctl enable bacula-fd.service
-#       start : systemctl start bacula-fd.service
 #
-# Bacula File Daemon service
+#    enable : systemctl enable bacula-fd
+#    start : systemctl start bacula-fd
+#
 #
+
+# from http://www.freedesktop.org/software/systemd/man/systemd.unit.html
 [Unit]
-Description=Bacula File Daemon service
-Requires=var-run.mount nss-lookup.target network.target remote-fs.target syslog.target time-sync.target
-After=var-run.mount nss-lookup.target network.target remote-fs.target syslog.target time-sync.target
-# Wants=
-# Before=
-# Conflicts=
+Description=Bacula Enterprise File Daemon service
+Requires=network.target
+After=network.target
+RequiresMountsFor=@working_dir@ @sysconfdir@ @sbindir@ @piddir@
 
+# from http://www.freedesktop.org/software/systemd/man/systemd.service.html
 [Service]
 Type=forking
 User=@fd_user@
 Group=@fd_group@
-PIDFile=@piddir@/bacula-fd.@fd_port@.pid
-StandardOutput=syslog
 ExecStart=@sbindir@/bacula-fd -c @sysconfdir@/bacula-fd.conf
+PIDFile=@piddir@/bacula-fd.@fd_port@.pid
+StandardError=syslog
 
 [Install]
 WantedBy=multi-user.target
index 2d4dc1a5191c0fcfeff842e9ff26fc316c1e9459..5c9182eb3876c2fcaf9085cdea3e5dcc04ed4c28 100644 (file)
@@ -1,32 +1,32 @@
-# This file is part of package Bacula Storage Daemon
+# Systemd Bacula Enterprise service file
+#
+# Copyright (C) Kern Sibbald 2011-2015
+# License: BSD 2-Clause
+#
+# /lib/systemd/system/bacula-sd.service
 #
-# Copyright (c) 2011 Free Software Foundation Europe e.V.
-# for Bacula Community
-# Author: Bruno Friedmann
 # Description:
 #    Used to start the bacula storage daemon service (bacula-sd)
-#    will be installed as /lib/systemd/system/bacula-sd.service
-#    enable : systemctl enable bacula-sd.service
-#    start : systemctl start bacula-sd.service
+#    enable : systemctl enable bacula-sd
+#    start : systemctl start bacula-sd
 #
-# Bacula Storage Daemon service
 #
+
+# from http://www.freedesktop.org/software/systemd/man/systemd.unit.html
 [Unit]
-Description=Bacula Storage Daemon service
-Requires=var-run.mount nss-lookup.target network.target remote-fs.target syslog.target time-sync.target
-After=var-run.mount nss-lookup.target network.target remote-fs.target syslog.target time-sync.target
-# Wants=
-# Before=
-# Conflicts=
+Description=Bacula Enterprise Storage Daemon service
+Requires=network.target
+After=network.target
+RequiresMountsFor=@working_dir@ @sysconfdir@ @sbindir@ @piddir@
 
+# from http://www.freedesktop.org/software/systemd/man/systemd.service.html
 [Service]
 Type=forking
 User=@sd_user@
 Group=@sd_group@
-PIDFile=@piddir@/bacula-sd.@sd_port@.pid
-# EnvironmentFile=-/etc/sysconfig/bacula-sd
-StandardOutput=syslog
 ExecStart=@sbindir@/bacula-sd -c @sysconfdir@/bacula-sd.conf
+PIDFile=@piddir@/bacula-sd.@sd_port@.pid
+StandardError=syslog
 
 [Install]
 WantedBy=multi-user.target
index 124b381fdf71f9bd3fded6a404ca1fe09d938258..89cfbb56748542a76bd882054fb7595ca62b55c6 100644 (file)
@@ -1,3 +1,6 @@
+#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
 # 
 # This file is used as the template to create the
 # Makefile for the unknown specific installation.