summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorxtraeme <xtraeme>2005-02-18 07:50:49 +0000
committerxtraeme <xtraeme>2005-02-18 07:50:49 +0000
commit7211ae793a70981026a1ac586f7af58e3477db8f (patch)
treedec6d63cc56dc4349eb1ac7ea7280d2f1b631c08 /devel
parent92ef51ea7f9a20f90c2a3dc4db7ef4df3905ae9a (diff)
downloadpkgsrc-7211ae793a70981026a1ac586f7af58e3477db8f.tar.gz
Before starting distcc, ${DISTCC_PIDDIR} must exist and must have the
correct permissions. Reported by jtc@ in the tech-pkg mailing list.
Diffstat (limited to 'devel')
-rwxr-xr-xdevel/distcc/files/distccd.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/devel/distcc/files/distccd.sh b/devel/distcc/files/distccd.sh
index d3193a36b30..bb5311ceb96 100755
--- a/devel/distcc/files/distccd.sh
+++ b/devel/distcc/files/distccd.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: distccd.sh,v 1.6 2004/11/17 11:45:49 xtraeme Exp $
+# $NetBSD: distccd.sh,v 1.7 2005/02/18 07:50:49 xtraeme Exp $
#
# PROVIDE: distccd
@@ -17,6 +17,16 @@ pidfile="@DISTCC_PIDDIR@/${name}.pid"
command_args="--daemon --pid-file ${pidfile}"
distccd_user="@DISTCC_USER@"
distccd_group="@DISTCC_GROUP@"
+start_precmd="distcc_precmd"
+
+distcc_precmd()
+{
+ if [ ! -d @DISTCC_PIDDIR@ ]; then
+ @MKDIR@ @DISTCC_PIDDIR@
+ @CHMOD@ 0700 @DISTCC_PIDDIR@
+ @CHOWN@ @DISTCC_USER@ @DISTCC_PIDDIR@
+ fi
+}
if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -f /etc/rc.d/DAEMON ]; then
load_rc_config $name
@@ -24,6 +34,7 @@ if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -f /etc/rc.d/DAEMON ]; then
else
case ${1:-start} in
start)
+ distcc_precmd
if [ -x ${command} ]; then
echo "Starting ${name}."
eval ${command} ${distccd_flags} ${command_args}