On 10/14/2011 01:59 PM, Bruno Friedmann wrote:
> Dear Bacula's dev find joined a patch to create and have an option to 
> configure/build native systemd service files.
> 
> systemd is the replacement of sysV init
> 
> It will be ship by default in Fedora 16 and openSUSE 12.1 and will be 
> optionnal in next Debian.
> 
> This doesn't touch any core functions and seems to be safe to have in next 5.2
> people can get the native systemd serivces build with the --enable-systemd 
> configure option
> 
> The only small default (losing one feature compared to init.d scripts) is the 
> loose of passing $2 (mainly -d999)
> for starting the service. For the moment until with systemd upstream I found 
> a cool way to do that
> any admin can edit the .service file add the -d to the start line and run a 
> restart.
> The other one to be safe, I actually not try to have the reload function 
> implemented for the director
> which is not really needed on my point of view : usage of bacula-dir -t is 
> better to get any configuration error
> raised , and then be safe when admin issue a bconsole reload.
> 
> I'm running those service files from one month now, even with 5.0.3 version, 
> without a problem.
> 
> I'm truly open to any advice, comment and tests you can share.
> 
> I've documented the usage of .service file directly in source.
> I would like to thanks Marco for his precious help with the 
> autoconf/configure stuff.
> 
> 
> 

And shit happen !!! :D

Sorry wrong stuff attached ..

here it is



-- 

Bruno Friedmann
Ioda-Net Sàrl www.ioda-net.ch

openSUSE Member & Ambassador
GPG KEY : D5C9B751C4653227
irc: tigerfoot
From adb5e21f41e691b5a7cf10f53fbd86dd0c06fced Mon Sep 17 00:00:00 2001
From: Bruno Friedmann <br...@ioda-net.ch>
Date: Mon, 10 Oct 2011 17:06:00 +0200
Subject: [PATCH 1/5] Makefile.in and service ready for systemd

Signed-off-by: Bruno Friedmann <br...@ioda-net.ch>
---
 bacula/platforms/Makefile.in                   |    2 +-
 bacula/platforms/systemd/Makefile.in           |   97 ++++++++++++++++++++++++
 bacula/platforms/systemd/bacula-dir.service.in |   32 ++++++++
 bacula/platforms/systemd/bacula-fd.service.in  |   30 +++++++
 bacula/platforms/systemd/bacula-sd.service.in  |   30 +++++++
 5 files changed, 190 insertions(+), 1 deletions(-)
 create mode 100644 bacula/platforms/systemd/Makefile.in
 create mode 100644 bacula/platforms/systemd/bacula-dir.service.in
 create mode 100644 bacula/platforms/systemd/bacula-fd.service.in
 create mode 100644 bacula/platforms/systemd/bacula-sd.service.in

diff --git a/bacula/platforms/Makefile.in b/bacula/platforms/Makefile.in
index 79101b0..bba619b 100644
--- a/bacula/platforms/Makefile.in
+++ b/bacula/platforms/Makefile.in
@@ -12,7 +12,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL = @INSTALL@
 
 SUBDIRS = freebsd redhat solaris unknown openbsd osx irix gentoo \
-	  debian darwin aix bsdi mandrake slackware alpha ubuntu
+	  debian darwin aix bsdi mandrake slackware alpha ubuntu systemd
 
 MAKE = make
 
diff --git a/bacula/platforms/systemd/Makefile.in b/bacula/platforms/systemd/Makefile.in
new file mode 100644
index 0000000..826c958
--- /dev/null
+++ b/bacula/platforms/systemd/Makefile.in
@@ -0,0 +1,97 @@
+#
+# This file is used as the template to create the
+# Makefile for the systemd specific installation.
+#
+#
+#  for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+# should be /lib/systemd/system and get be get with
+# systemctl show | grep UnitPath | cut -d " " -f2
+SYSTEMD_UNITDIR = @SYSTEMD_UNITDIR@
+
+nothing:
+
+install: install-autostart
+
+install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir
+
+
+install-autostart-fd:
+	@if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-fd.service; then \
+	   /bin/systemctl stop bacula-fd.service; \
+	   /bin/systemctl disable bacula-fd.service; \
+	fi
+	@$(INSTALL_PROGRAM) -m 644 bacula-fd.service $(DESTDIR)/$(SYSTEMD_UNITDIR)/bacula-fd.service
+	# set symlinks for script at startup and shutdown
+	@if test x$(DESTDIR) = x ; then \
+	   /bin/systemctl enable bacula-fd.service; \
+	   /bin/systemctl start bacula-fd.service; \
+	fi
+
+
+install-autostart-sd:
+	@if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-sd.service; then \
+	   /bin/systemctl stop bacula-sd.service; \
+	   /bin/systemctl disable bacula-sd.service; \
+	fi
+	@$(INSTALL_PROGRAM) -m 644 bacula-sd.service $(DESTDIR)/$(SYSTEMD_UNITDIR)/bacula-sd.service
+	# set symlinks for script at startup and shutdown
+	@if test x$(DESTDIR) = x ; then \
+	   /bin/systemctl enable bacula-sd.service; \
+	   /bin/systemctl start bacula-sd.service; \
+	fi
+
+
+install-autostart-dir:
+	@if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-dir.service; then \
+	   /bin/systemctl stop bacula-dir.service; \
+	   /bin/systemctl disable bacula-dir.service; \
+	fi
+	@$(INSTALL_PROGRAM) -m 644 bacula-dir.service $(DESTDIR)/$(SYSTEMD_UNITDIR)/bacula-dir.service
+	# set symlinks for script at startup and shutdown
+	@if test x$(DESTDIR) = x ; then \
+	   /bin/systemctl enable bacula-dir.service; \
+	   /bin/systemctl start bacula-dir.service; \
+	fi
+
+
+uninstall: uninstall-autostart
+
+uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir
+
+uninstall-autostart-fd:
+	@if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-fd.service; then \
+	   /bin/systemctl stop bacula-fd.service; \
+	   /bin/systemctl disable bacula-fd.service; \
+	fi
+	@rm -f	$(DESTDIR)$(SYSTEMD_UNITDIR)/bacula-fd.service
+
+
+uninstall-autostart-sd:
+	@if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-sd.service; then \
+	   /bin/systemctl stop bacula-fd.service; \
+	   /bin/systemctl disable bacula-fd.service; \
+	fi
+	@rm -f	$(DESTDIR)$(SYSTEMD_UNITDIR)/bacula-sd.service
+
+uninstall-autostart-dir:
+	@if test x$(DESTDIR) = x -a  -f $(SYSTEMD)/bacula-dir.service; then \
+	   /bin/systemctl stop bacula-dir.service; \
+	   /bin/systemctl disable bacula-dir.service; \
+	fi
+	@rm -f	$(DESTDIR)$(SYSTEMD_UNITDIR)/bacula-dir.service
+
+clean:
+	@rm -f 1 2 3
+
+distclean: clean
+	@rm -f Makefile bacula-*.spec bacula.*.spec bacula.spec
+	@rm -f bacula-sd.service bacula-fd.service bacula-dir.service
+
+devclean: clean
+	@rm -f Makefile bacula-*.spec bacula.*.spec bacula.spec
+	@rm -f bacula-sd.service bacula-fd.service bacula-dir.service
+
diff --git a/bacula/platforms/systemd/bacula-dir.service.in b/bacula/platforms/systemd/bacula-dir.service.in
new file mode 100644
index 0000000..a10488e
--- /dev/null
+++ b/bacula/platforms/systemd/bacula-dir.service.in
@@ -0,0 +1,32 @@
+# This file is part of package Bacula Director Daemon
+#
+# 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
+#
+# Bacula Director Daemon service
+#
+[Unit]
+Description=Bacula Director 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=@DB_TYPE@.service
+# Before=
+# Conflicts=
+
+[Service]
+Type=forking
+PIDFile=@piddir@/bacula-dir.pid
+# EnvironmentFile=-/etc/sysconfig/bacula-dir
+StandardOutput=syslog
+ExecStart=@sbindir@/bacula-dir -u @dir_user@ -g @dir_group@ -c @sysconfig@/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
+
+[Install]
+WantedBy=multi-user.target
diff --git a/bacula/platforms/systemd/bacula-fd.service.in b/bacula/platforms/systemd/bacula-fd.service.in
new file mode 100644
index 0000000..7595768
--- /dev/null
+++ b/bacula/platforms/systemd/bacula-fd.service.in
@@ -0,0 +1,30 @@
+File daemon ( actually work well)
+# This file is part of package Bacula File Daemon
+#
+# 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
+#
+[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=
+
+[Service]
+Type=forking
+PIDFile=@piddir@/bacula-fd.pid
+StandardOutput=syslog
+ExecStart=@sbindir@/bacula-fd -u @fd_user@ -g @fd_group@ -c @sysconfig@/bacula-fd.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/bacula/platforms/systemd/bacula-sd.service.in b/bacula/platforms/systemd/bacula-sd.service.in
new file mode 100644
index 0000000..4d542f9
--- /dev/null
+++ b/bacula/platforms/systemd/bacula-sd.service.in
@@ -0,0 +1,30 @@
+# This file is part of package Bacula Storage Daemon
+#
+# 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
+#
+# Bacula Storage Daemon service
+#
+[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=
+
+[Service]
+Type=forking
+PIDFile=@piddir@/bacula-sd.pid
+# EnvironmentFile=-/etc/sysconfig/bacula-sd
+StandardOutput=syslog
+ExecStart=@sbindir@/bacula-sd -u @sd_user@ -g @sd_group@ -c @sysconfig@/bacula-sd.conf
+
+[Install]
+WantedBy=multi-user.target
-- 
1.7.7


From 7540072bdcc5635819361582faa1bb488637a2f3 Mon Sep 17 00:00:00 2001
From: Marco van Wieringen <m...@planets.elm.net>
Date: Tue, 11 Oct 2011 10:21:48 +0200
Subject: [PATCH 2/5] Added systemd configure actions

Signed-off-by: Bruno Friedmann <br...@ioda-net.ch>
---
 bacula/autoconf/configure.in |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in
index 479accd..71a1795 100644
--- a/bacula/autoconf/configure.in
+++ b/bacula/autoconf/configure.in
@@ -3091,8 +3091,7 @@ redhat)
        platforms/redhat/Makefile \
        platforms/redhat/bacula-fd \
        platforms/redhat/bacula-sd \
-       platforms/redhat/bacula-dir
-       "
+       platforms/redhat/bacula-dir"
   ;;
 mandrake)
    DISTVER=`cat /etc/mandrake-release | grep release |\
@@ -3103,8 +3102,7 @@ mandrake)
        platforms/mandrake/Makefile \
        platforms/mandrake/bacula-fd \
        platforms/mandrake/bacula-sd \
-       platforms/mandrake/bacula-dir \
-       "
+       platforms/mandrake/bacula-dir"
   ;;
 gentoo)
    DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
@@ -3112,7 +3110,7 @@ gentoo)
    PSCMD="ps -e -o pid,command"
    PFILES="${PFILES} \
        platforms/gentoo/Makefile \
-    platforms/gentoo/bacula-init \
+       platforms/gentoo/bacula-init \
        platforms/gentoo/bacula-fd \
        platforms/gentoo/bacula-sd \
        platforms/gentoo/bacula-dir"
@@ -3125,7 +3123,7 @@ slackware)
        platforms/slackware/Makefile \
        platforms/slackware/rc.bacula-fd \
        platforms/slackware/rc.bacula-sd \
-       platforms/slackware/rc.bacula-dir\
+       platforms/slackware/rc.bacula-dir \
        platforms/slackware/functions.bacula"
   ;;
 solaris)
@@ -3183,6 +3181,20 @@ unknown)
   ;;
 esac  
 
+dnl -------------------------------------------
+dnl systemd (default off)
+dnl -------------------------------------------
+AC_ARG_ENABLE(systemd,
+   AC_HELP_STRING([--enable-systemd], [enable creation of systemd service files@<:@default=no@:>@]),
+   [
+       PFILES="${PFILES} \
+           platforms/systemd/Makefile \
+           platforms/systemd/bacula-dir.service \
+           platforms/systemd/bacula-fd.service \
+           platforms/systemd/bacula-sd.service"
+   ]
+)
+
 AC_SUBST(hostname)
 
 LIBS="$PTHREAD_LIB $LIBS"
-- 
1.7.7


From aa90d4a8b6d2dccb103bc29f30d69232eacea1d8 Mon Sep 17 00:00:00 2001
From: Marco van Wieringen <m...@planets.elm.net>
Date: Tue, 11 Oct 2011 10:28:38 +0200
Subject: [PATCH 3/5] Rebuild configure.

Signed-off-by: Bruno Friedmann <br...@ioda-net.ch>
---
 bacula/configure |  103 +++++++++++++++++++++++++++++------------------------
 1 files changed, 56 insertions(+), 47 deletions(-)

diff --git a/bacula/configure b/bacula/configure
index c13e183..3982f0a 100755
--- a/bacula/configure
+++ b/bacula/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for bacula 5.2.0rc1.
+# Generated by GNU Autoconf 2.67 for bacula 5.2.0rc2.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -559,8 +559,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='bacula'
 PACKAGE_TARNAME='bacula'
-PACKAGE_VERSION='5.2.0rc1'
-PACKAGE_STRING='bacula 5.2.0rc1'
+PACKAGE_VERSION='5.2.0rc2'
+PACKAGE_STRING='bacula 5.2.0rc2'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -980,6 +980,7 @@ enable_largefile
 with_x
 enable_acl
 enable_xattr
+enable_systemd
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1539,7 +1540,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures bacula 5.2.0rc1 to adapt to many kinds of systems.
+\`configure' configures bacula 5.2.0rc2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1608,7 +1609,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of bacula 5.2.0rc1:";;
+     short | recursive ) echo "Configuration of bacula 5.2.0rc2:";;
    esac
   cat <<\_ACEOF
 
@@ -1648,6 +1649,7 @@ Optional Features:
   --disable-largefile     omit support for large files
   --disable-acl           disable acl support [default=auto]
   --disable-xattr         disable xattr support [default=auto]
+  --enable-systemd        enable creation of systemd service files[default=no]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1805,7 +1807,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-bacula configure 5.2.0rc1
+bacula configure 5.2.0rc2
 generated by GNU Autoconf 2.67
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2735,7 +2737,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by bacula $as_me 5.2.0rc1, which was
+It was created by bacula $as_me 5.2.0rc2, which was
 generated by GNU Autoconf 2.67.  Invocation command line was
 
   $ $0 $@
@@ -2994,7 +2996,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
@@ -3563,7 +3565,7 @@ fi
 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -3678,7 +3680,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -3721,7 +3723,7 @@ else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest conftest$ac_cv_exeext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -3780,7 +3782,7 @@ $as_echo "$ac_try_echo"; } >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
@@ -3832,7 +3834,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
@@ -4548,7 +4550,7 @@ else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -5948,7 +5950,7 @@ fi
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -5981,7 +5983,7 @@ fi
 $as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -13276,7 +13278,7 @@ else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -21997,7 +21999,7 @@ if test x$support_conio = xyes; then
 $as_echo "#define HAVE_CONIO 1" >>confdefs.h
 
    else
-      echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
+      echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "
    fi
 fi
 
@@ -22965,6 +22967,8 @@ fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $support_tls" >&5
+$as_echo "$support_tls" >&6; }
    if test "$support_tls" = "yes"; then
 
 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
@@ -23039,17 +23043,11 @@ fi
 else
    support_tls="no"
    support_crypto="no"
-   OPENSSL_LIBS=""
-   OPENSSL_INC=""
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $support_tls" >&5
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $support_tls" >&5
 $as_echo "$support_tls" >&6; }
-
-if test "$support_tls" = "no"; then
-   OPENSSL_LIBS=""
-   OPENSSL_INC=""
 fi
-if test "$support_crypto" = "no"; then
+
+if test "$support_tls" = "no" -o "$support_crypto" = "no"; then
    OPENSSL_LIBS=""
    OPENSSL_INC=""
 fi
@@ -24839,7 +24837,7 @@ if test "x$with_x" = xno; then
   have_x=disabled
 else
   case $x_includes,$x_libraries in #(
-    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
+    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
@@ -26623,7 +26621,7 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
      ;; #(
    *)
      as_fn_error $? "unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5  ;;
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
  esac
 
 
@@ -27257,7 +27255,7 @@ else
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "cannot compute sizeof (char)
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_char=0
    fi
@@ -27290,7 +27288,7 @@ else
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "cannot compute sizeof (short int)
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_short_int=0
    fi
@@ -27323,7 +27321,7 @@ else
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "cannot compute sizeof (int)
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_int=0
    fi
@@ -27356,7 +27354,7 @@ else
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "cannot compute sizeof (long int)
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_long_int=0
    fi
@@ -27389,7 +27387,7 @@ else
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "cannot compute sizeof (long long int)
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_long_long_int=0
    fi
@@ -27422,7 +27420,7 @@ else
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "cannot compute sizeof (int *)
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_int_p=0
    fi
@@ -30160,8 +30158,7 @@ redhat)
        platforms/redhat/Makefile \
        platforms/redhat/bacula-fd \
        platforms/redhat/bacula-sd \
-       platforms/redhat/bacula-dir
-       "
+       platforms/redhat/bacula-dir"
   ;;
 mandrake)
    DISTVER=`cat /etc/mandrake-release | grep release |\
@@ -30172,8 +30169,7 @@ mandrake)
        platforms/mandrake/Makefile \
        platforms/mandrake/bacula-fd \
        platforms/mandrake/bacula-sd \
-       platforms/mandrake/bacula-dir \
-       "
+       platforms/mandrake/bacula-dir"
   ;;
 gentoo)
    DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
@@ -30181,7 +30177,7 @@ gentoo)
    PSCMD="ps -e -o pid,command"
    PFILES="${PFILES} \
        platforms/gentoo/Makefile \
-    platforms/gentoo/bacula-init \
+       platforms/gentoo/bacula-init \
        platforms/gentoo/bacula-fd \
        platforms/gentoo/bacula-sd \
        platforms/gentoo/bacula-dir"
@@ -30194,7 +30190,7 @@ slackware)
        platforms/slackware/Makefile \
        platforms/slackware/rc.bacula-fd \
        platforms/slackware/rc.bacula-sd \
-       platforms/slackware/rc.bacula-dir\
+       platforms/slackware/rc.bacula-dir \
        platforms/slackware/functions.bacula"
   ;;
 solaris)
@@ -30255,6 +30251,19 @@ unknown)
   ;;
 esac
 
+# Check whether --enable-systemd was given.
+if test "${enable_systemd+set}" = set; then :
+  enableval=$enable_systemd;
+       PFILES="${PFILES} \
+           platforms/systemd/Makefile \
+           platforms/systemd/bacula-dir.service \
+           platforms/systemd/bacula-fd.service \
+           platforms/systemd/bacula-sd.service"
+
+
+fi
+
+
 
 
 LIBS="$PTHREAD_LIB $LIBS"
@@ -30802,7 +30811,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by bacula $as_me 5.2.0rc1, which was
+This file was extended by bacula $as_me 5.2.0rc2, which was
 generated by GNU Autoconf 2.67.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -30868,7 +30877,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-bacula config.status 5.2.0rc1
+bacula config.status 5.2.0rc2
 configured by $0, generated by GNU Autoconf 2.67,
   with options \\"\$ac_cs_config\\"
 
@@ -31487,7 +31496,7 @@ do
     "$PFILES") CONFIG_FILES="$CONFIG_FILES $PFILES" ;;
     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
 
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -31837,7 +31846,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -31865,7 +31874,7 @@ do
 	   [\\/$]*) false;;
 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
 	   esac ||
-	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -31892,7 +31901,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
 
     case $ac_tag in
     *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
-- 
1.7.7


From 555b8079a749f413e4bdc730d46c2617b06bbe04 Mon Sep 17 00:00:00 2001
From: Bruno Friedmann <br...@ioda-net.ch>
Date: Wed, 12 Oct 2011 07:53:19 +0200
Subject: [PATCH 4/5] Fixed type in sysconfdir

Signed-off-by: Bruno Friedmann <br...@ioda-net.ch>
---
 bacula/platforms/systemd/bacula-dir.service.in |    2 +-
 bacula/platforms/systemd/bacula-fd.service.in  |    2 +-
 bacula/platforms/systemd/bacula-sd.service.in  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bacula/platforms/systemd/bacula-dir.service.in b/bacula/platforms/systemd/bacula-dir.service.in
index a10488e..7f18b84 100644
--- a/bacula/platforms/systemd/bacula-dir.service.in
+++ b/bacula/platforms/systemd/bacula-dir.service.in
@@ -24,7 +24,7 @@ Type=forking
 PIDFile=@piddir@/bacula-dir.pid
 # EnvironmentFile=-/etc/sysconfig/bacula-dir
 StandardOutput=syslog
-ExecStart=@sbindir@/bacula-dir -u @dir_user@ -g @dir_group@ -c @sysconfig@/bacula-dir.conf
+ExecStart=@sbindir@/bacula-dir -u @dir_user@ -g @dir_group@ -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
 
diff --git a/bacula/platforms/systemd/bacula-fd.service.in b/bacula/platforms/systemd/bacula-fd.service.in
index 7595768..23169c5 100644
--- a/bacula/platforms/systemd/bacula-fd.service.in
+++ b/bacula/platforms/systemd/bacula-fd.service.in
@@ -24,7 +24,7 @@ After=var-run.mount nss-lookup.target network.target remote-fs.target syslog.tar
 Type=forking
 PIDFile=@piddir@/bacula-fd.pid
 StandardOutput=syslog
-ExecStart=@sbindir@/bacula-fd -u @fd_user@ -g @fd_group@ -c @sysconfig@/bacula-fd.conf
+ExecStart=@sbindir@/bacula-fd -u @fd_user@ -g @fd_group@ -c @sysconfdir@/bacula-fd.conf
 
 [Install]
 WantedBy=multi-user.target
diff --git a/bacula/platforms/systemd/bacula-sd.service.in b/bacula/platforms/systemd/bacula-sd.service.in
index 4d542f9..58687dc 100644
--- a/bacula/platforms/systemd/bacula-sd.service.in
+++ b/bacula/platforms/systemd/bacula-sd.service.in
@@ -24,7 +24,7 @@ Type=forking
 PIDFile=@piddir@/bacula-sd.pid
 # EnvironmentFile=-/etc/sysconfig/bacula-sd
 StandardOutput=syslog
-ExecStart=@sbindir@/bacula-sd -u @sd_user@ -g @sd_group@ -c @sysconfig@/bacula-sd.conf
+ExecStart=@sbindir@/bacula-sd -u @sd_user@ -g @sd_group@ -c @sysconfdir@/bacula-sd.conf
 
 [Install]
 WantedBy=multi-user.target
-- 
1.7.7


From 14623e12e611130afce57fc6b27272cd94108b5a Mon Sep 17 00:00:00 2001
From: Bruno Friedmann <br...@ioda-net.ch>
Date: Fri, 14 Oct 2011 13:45:55 +0200
Subject: [PATCH 5/5] Ignore plateforms/systemd created files

---
 bacula/.gitignore |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/bacula/.gitignore b/bacula/.gitignore
index 759386d..164e09f 100644
--- a/bacula/.gitignore
+++ b/bacula/.gitignore
@@ -154,6 +154,12 @@ platforms/suse/bacula-fd
 platforms/suse/bacula-sd
 platforms/suse/bacula.spec
 
+# platforms/systemd/
+platforms/suse/Makefile
+platforms/suse/bacula-dir.service
+platforms/suse/bacula-fd.service
+platforms/suse/bacula-sd.service
+
 # platforms/ubuntu/
 platforms/ubuntu/Makefile
 platforms/ubuntu/bacula-dir
-- 
1.7.7

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to