]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
bacula: Update to use IPFire initscript
authorAdolf Belka <ahb.ipfire@gmail.com>
Sat, 5 Dec 2020 14:51:11 +0000 (15:51 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Dec 2020 12:28:58 +0000 (12:28 +0000)
Bacula install used the bacula initscript for starting and stopping bacula.
This works fine but results in no pid or memory input in the addons table
under services.
Using the IPFire initscript also successfully starts and stops bacula with
no problems but also provides the pid and memory information in the services
addons table.
- rootfiles adjusted to remove the reference to bacula-ctl-fd
- lfs/bacula adjusted to remove the init.d/bacula link generation
             remove the "rm -f /root/.rnd" command. This file is not present
             and I have not seen this command in any other lfs file that I
             have looked at.
- new bacula initscript created

Signed-off-by: Adolf Belka <ahb.ipfire@gmail.com>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/packages/bacula
lfs/bacula
src/initscripts/packages/bacula [new file with mode: 0644]

index bb766fb0770ea27eb6b3702ffc6ffea9c507956c..51869b47ea2ece9b21caa25355b1c0daae949b43 100644 (file)
@@ -1,7 +1,7 @@
 #etc/bacula
 #etc/bacula/bacula
 #etc/bacula/bacula-ctl-dir
-etc/bacula/bacula-ctl-fd
+#etc/bacula/bacula-ctl-fd
 #etc/bacula/bacula-ctl-sd
 etc/bacula/bacula-fd.conf
 #etc/bacula/bacula-tray-monitor.desktop
index 1921db11a8796f92be2656a5dbad534783c02efc..5268b46d6660e20b540ce4abcf316f08763a71a2 100644 (file)
@@ -32,7 +32,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = bacula
-PAK_VER    = 7
+PAK_VER    = 8
 
 DEPS       =
 
@@ -89,10 +89,12 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
                                --enable-client-only
        cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
-       ln -sf /etc/bacula/bacula-ctl-fd /etc/rc.d/init.d/bacula
+
+       #install initscripts
+       $(call INSTALL_INITSCRIPT,bacula)
+
        install -v -m 644 ${DIR_SRC}/config/backup/includes/bacula \
                        /var/ipfire/backup/addons/includes/bacula
-       rm -f /root/.rnd
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
 
diff --git a/src/initscripts/packages/bacula b/src/initscripts/packages/bacula
new file mode 100644 (file)
index 0000000..2b925ad
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+# Begin $rc_base/init.d/bacula
+
+# Based on sysklogd script from LFS-3.1 and earlier.
+
+. /etc/sysconfig/rc
+. $rc_functions
+
+case "$1" in
+        start)
+                boot_mesg "Starting bacula-fd daemon..."
+                loadproc /usr/sbin/bacula-fd
+                ;;
+        stop)
+                boot_mesg "Stopping bacula-fd daemon..."
+                killproc /usr/sbin/bacula-fd
+                ;;
+        status)
+                statusproc /usr/sbin/bacula-fd
+                ;;
+        *)
+                echo "Usage: $0 (start|stop|status)"
+                exit 1
+                ;;
+esac
+
+# End $rc_base/init.d/bacula
+