summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authoradrianp <adrianp>2009-02-23 09:22:16 +0000
committeradrianp <adrianp>2009-02-23 09:22:16 +0000
commit901e470d89f45c7f859fba36c97a4e85848f017e (patch)
treecac13ef587fa0fe0b84f7002f9e9d9c351c2013e /net
parent6fa212dd582eea445faa7cc940699e53ba78f291 (diff)
downloadpkgsrc-901e470d89f45c7f859fba36c97a4e85848f017e.tar.gz
Since rc1 the default location of the pidfiles have changed so update
the rc.d scripts accordingly. Problem found by John Klos
Diffstat (limited to 'net')
-rw-r--r--net/bind96/files/lwresd.sh13
-rw-r--r--net/bind96/files/named9.sh14
2 files changed, 22 insertions, 5 deletions
diff --git a/net/bind96/files/lwresd.sh b/net/bind96/files/lwresd.sh
index 1f1cd6df583..3615742f9f7 100644
--- a/net/bind96/files/lwresd.sh
+++ b/net/bind96/files/lwresd.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: lwresd.sh,v 1.1.1.1 2009/01/04 00:21:36 adrianp Exp $
+# $NetBSD: lwresd.sh,v 1.2 2009/02/23 09:22:16 adrianp Exp $
#
# PROVIDE: lwresd
# REQUIRE: SERVERS
@@ -10,9 +10,16 @@
name="lwresd"
rcvar=${name}
command="@PREFIX@/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-
+pidfile="@VARBASE@/run/lwresd/${name}.pid"
extra_commands="reload"
+start_precmd="lwresd_precmd"
+
+lwresd_precmd()
+{
+ if [ ! -d @VARBASE@/run/lwresd ]; then
+ @MKDIR@ @VARBASE@/run/lwresd
+ fi
+}
load_rc_config ${name} # check /etc/rc.conf.d/named9
run_rc_command "$1"
diff --git a/net/bind96/files/named9.sh b/net/bind96/files/named9.sh
index e84e7208936..5a9ff595dd3 100644
--- a/net/bind96/files/named9.sh
+++ b/net/bind96/files/named9.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: named9.sh,v 1.1.1.1 2009/01/04 00:21:36 adrianp Exp $
+# $NetBSD: named9.sh,v 1.2 2009/02/23 09:22:16 adrianp Exp $
#
# PROVIDE: named
@@ -13,7 +13,7 @@
name="named"
rcvar="${name}9"
command="@PREFIX@/sbin/${name}"
-pidfile="/var/run/${name}.pid"
+pidfile="@VARBASE@/run/named/${name}.pid"
start_precmd="named_precmd"
extra_commands="reload"
required_dirs="$named_chrootdir" # if it is set, it must exist
@@ -27,6 +27,10 @@ named_precmd()
return 1
fi
+ if [ ! -d @VARBASE@/run/named ]; then
+ @MKDIR@ @VARBASE@/run/named
+ fi
+
if [ -z "$named_chrootdir" ]; then
return 0;
fi
@@ -35,10 +39,16 @@ named_precmd()
@RM@ -f "${named_chrootdir}/dev/null"
( cd /dev ; @PAX@ -rw -pe null "${named_chrootdir}/dev" )
fi
+
if [ -f /etc/localtime ]; then
@CMP@ -s /etc/localtime "${named_chrootdir}/etc/localtime" || \
@CP@ -p /etc/localtime "${named_chrootdir}/etc/localtime"
fi
+
+ if [ ! -d ${named_chrootdir}@VARBASE@/run/named ]; then
+ @MKDIR@ ${named_chrootdir}@VARBASE@/run/named
+ fi
+
@RM@ -f ${pidfile}
@LN@ -s "${named_chrootdir}${pidfile}" ${pidfile}