From patchwork Sat Dec 5 14:51:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 3701 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4CpCFj50ppz3ws3 for ; Sat, 5 Dec 2020 14:51:37 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4CpCFf72xxz1fJ; Sat, 5 Dec 2020 14:51:34 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4CpCFd6r8Rz2xvK; Sat, 5 Dec 2020 14:51:33 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4CpCFd2FNbz2xZk for ; Sat, 5 Dec 2020 14:51:33 +0000 (UTC) Received: from smtpq3.tb.mail.iss.as9143.net (smtpq3.tb.mail.iss.as9143.net [212.54.42.166]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4CpCFc4JTYz1fJ for ; Sat, 5 Dec 2020 14:51:32 +0000 (UTC) Received: from [212.54.42.110] (helo=smtp7.tb.mail.iss.as9143.net) by smtpq3.tb.mail.iss.as9143.net with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klYuK-00019J-5P; Sat, 05 Dec 2020 15:51:32 +0100 Received: from j103033.upc-j.chello.nl ([24.132.103.33] helo=rhea.saturn.pimb.org) by smtp7.tb.mail.iss.as9143.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1klYuJ-001n16-8r; Sat, 05 Dec 2020 15:51:31 +0100 Received: from hyperion.saturn.pimb.org (hyperion.saturn.pimb.org [192.168.26.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by rhea.saturn.pimb.org (Postfix) with ESMTPSA id BD89A3EF6; Sat, 5 Dec 2020 15:51:30 +0100 (CET) From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] bacula: Update to use IPFire initscript Date: Sat, 5 Dec 2020 15:51:11 +0100 Message-Id: <20201205145111.3710929-1-ahb.ipfire@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-SourceIP: 24.132.103.33 X-Authenticated-Sender: adolf.belka@ziggo.nl (via SMTP) X-Ziggo-spambar: / X-Ziggo-spamscore: 0.0 X-Ziggo-spamreport: CMAE Analysis: v=2.4 cv=DJcxXwBb c=1 sm=1 tr=0 ts=5fcb9e73 a=N0UC3/faf55XGTeY5t7zSQ==:17 a=9+rZDBEiDlHhcck0kWbJtElFXBc=:19 a=zTNgK-yGK50A:10 a=x7bEGLp0ZPQA:10 a=6yxbeI8x3IIA:10 a=pGLkceISAAAA:8 a=POlQKDz1f7f24cR0KlkA:9 X-Ziggo-Spam-Status: No X-Spam-Status: No X-Spam-Flag: No ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1607179892; a=rsa-sha256; cv=none; b=OUrgSYDACZXiPjIs2VmRudykh/gBCEWX1iscwZbrmP1QFeYsoFHZosSroAx1Lj8s3o4jBz 9CmOJyWJSijs26rbLF6dfHQfXtdWGiKCo7tcqekTY3CghQhgKGZlvay/kkqFIMYEEi7110 5HsZL5A3/giVXueHcquSiBwSmolo7lcQZnJBDBIamX79pNYVggv5uyDtIeh/bvLdi/CvQp tnTk+N+a6BPLB+qXdR8T2GOsLsfgycp48vWxZfmwcuL8l7lehDDlt31oIXbJfmxE6ITp91 D02SCD0S64fsZtQ+7UBvb13gua1kAKaVz7qP72FmQV5eEVjPLX/Sg/+V/qpNgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1607179892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Zh0SuXMvzyYK6SlB9EpukNPV9viBVcCNqqnymH8RFA8=; b=sbXqXjY+NGdwf3aKW3p3xw83UF1IpXlvhTuWu21WNOcMtIs8x6hDv/esoi7facjkCZ30rr SsxH30TYZ9ylFMe8FJWxhN5+otudDopZSeSEkDbBcSzncqtnQ9Gu1pPWbZwYHqRlWGFsq4 2jqkmxhj/zK4rHUisgepGlNfXgBV8ksEDr4+oXzgx5vXkObeFmaE4oujLV2KWSVoBZwCtr +BubI3upjuhP8Bbnx3RDIcPNSbMSpnGdbcNb50GtFrBSUdeW8GI8v0dKm7gJJnElzz4UNC sQ7nvQ1ORJAwWk+0W/SVKTXX0VveyCwPNBnYUg8weD84mqK9G6TXqjOdFXOMtQ== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=none; spf=softfail (mail01.ipfire.org: 212.54.42.166 is neither permitted nor denied by domain of ahbipfire@gmail.com) smtp.mailfrom=ahbipfire@gmail.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none) Authentication-Results: mail01.ipfire.org; dkim=none; spf=softfail (mail01.ipfire.org: 212.54.42.166 is neither permitted nor denied by domain of ahbipfire@gmail.com) smtp.mailfrom=ahbipfire@gmail.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none) X-Rspamd-Server: mail01.haj.ipfire.org X-Spamd-Result: default: False [-1.04 / 11.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_MISSING_CHARSET(2.50)[]; RWL_MAILSPIKE_GOOD(0.00)[212.54.42.166:from]; IP_REPUTATION_HAM(-0.94)[asn: 33915(-0.15), country: NL(-0.00), ip: 212.54.42.166(-0.31)]; BROKEN_CONTENT_TYPE(1.50)[]; R_SPF_SOFTFAIL(0.00)[~all]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; RCVD_COUNT_THREE(0.00)[4]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_LOW(-0.10)[212.54.42.166:from]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; HAS_X_AS(0.00)[]; ASN(0.00)[asn:33915, ipnet:212.54.32.0/20, country:NL]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; BAYES_HAM(-3.00)[99.99%]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RECEIVED_SPAMHAUS_PBL(0.00)[24.132.103.33:received]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM(-1.00)[-1.000]; FREEMAIL_CC(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-Rspamd-Queue-Id: 4CpCFc4JTYz1fJ X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" 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/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 +