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.


-- 

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

openSUSE Member & Ambassador
GPG KEY : D5C9B751C4653227
irc: tigerfoot
From 6379b12e8931c0d4085a42e9a1d45ff606537201 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] Added systemd configure actions

---
 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

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