From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] bacula: Update to use IPFire initscript Date: Sat, 05 Dec 2020 15:51:11 +0100 Message-ID: <20201205145111.3710929-1-ahb.ipfire@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4725947361376911378==" List-Id: --===============4725947361376911378== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 --- 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/bac= ula 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 =3D $(URL_IPFIRE) DIR_APP =3D $(DIR_SRC)/$(THISAPP) TARGET =3D $(DIR_INFO)/$(THISAPP) PROG =3D bacula -PAK_VER =3D 7 +PAK_VER =3D 8 =20 DEPS =3D =20 @@ -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) =20 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 + --=20 2.29.2 --===============4725947361376911378==--