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(a)gmail.com>
---
config/rootfiles/packages/bacula | 2 +-
lfs/bacula | 8 +++++---
src/initscripts/packages/bacula | 28 ++++++++++++++++++++++++++++
3 files changed, 34 insertions(+), 4 deletions(-)
create mode 100644 src/initscripts/packages/bacula
diff --git a/config/rootfiles/packages/bacula b/config/rootfiles/packages/bacula
index bb766fb07..51869b47e 100644
--- a/config/rootfiles/packages/bacula
+++ b/config/rootfiles/packages/bacula
@@ -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
diff --git a/lfs/bacula b/lfs/bacula
index 1921db11a..5268b46d6 100644
--- a/lfs/bacula
+++ b/lfs/bacula
@@ -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
index 000000000..2b925ad4f
--- /dev/null
+++ b/src/initscripts/packages/bacula
@@ -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
+
--
2.29.2