pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/backuppc backuppc: fix nonexistent /var/run/B...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/554d72375008
branches:  trunk
changeset: 441619:554d72375008
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sat Nov 07 12:51:04 2020 +0000

description:
backuppc: fix nonexistent /var/run/BackupPC. Bump PKGREVISION.

Can't use OWN_DIRS for stuff under /var/run, it gets removed after reboot.
Create directory from the rc script instead.

diffstat:

 sysutils/backuppc/Makefile          |  4 ++--
 sysutils/backuppc/files/backuppc.sh |  8 +++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diffs (45 lines):

diff -r 06d49ce6c46e -r 554d72375008 sysutils/backuppc/Makefile
--- a/sysutils/backuppc/Makefile        Sat Nov 07 11:39:57 2020 +0000
+++ b/sysutils/backuppc/Makefile        Sat Nov 07 12:51:04 2020 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.14 2020/10/20 22:16:16 tnn Exp $
+# $NetBSD: Makefile,v 1.15 2020/11/07 12:51:04 tnn Exp $
 
 DISTNAME=      BackupPC-4.4.0
+PKGREVISION=   1
 PKGNAME=       ${DISTNAME:tl}
 CATEGORIES=    sysutils
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=backuppc/}
@@ -108,7 +109,6 @@
 OWN_DIRS_PERMS+=       ${VARBASE}/BackupPC/${d} ${BACKUPPC_USER} ${BACKUPPC_GROUP} 0750
 .endfor
 OWN_DIRS_PERMS+=       ${VARBASE}/log/BackupPC ${BACKUPPC_USER} ${BACKUPPC_GROUP} 0750
-OWN_DIRS_PERMS+=       ${VARBASE}/run/BackupPC ${BACKUPPC_USER} ${BACKUPPC_GROUP} 0750
 
 EGDIR=                 ${PREFIX}/share/examples/BackupPC
 CONF_FILES_PERMS+=     ${EGDIR}/config.pl ${PKG_SYSCONFDIR}/config.pl ${BACKUPPC_USER} ${BACKUPPC_GROUP} 0640
diff -r 06d49ce6c46e -r 554d72375008 sysutils/backuppc/files/backuppc.sh
--- a/sysutils/backuppc/files/backuppc.sh       Sat Nov 07 11:39:57 2020 +0000
+++ b/sysutils/backuppc/files/backuppc.sh       Sat Nov 07 12:51:04 2020 +0000
@@ -11,7 +11,7 @@
 
 name="backuppc"
 rcvar=$name
-status_cmd="backuppc_status"
+start_precmd="backuppc_precmd"
 reload_cmd="backuppc_reload"
 backuppc_user="@BACKUPPC_USER@"
 backuppc_group="@BACKUPPC_GROUP@"
@@ -22,6 +22,12 @@
 
 load_rc_config $name
 
+backuppc_precmd() {
+    mkdir -p "@VARBASE@/run/BackupPC"
+    chown "${backuppc_user}:${backuppc_group}" "@VARBASE@/run/BackupPC"
+    chmod 750 "@VARBASE@/run/BackupPC"
+}
+
 backuppc_reload()
 {
     pkill -1 -f "@PREFIX@/share/BackupPC/bin/BackupPC -d"



Home | Main Index | Thread Index | Old Index