summaryrefslogtreecommitdiff
path: root/devel/distcc
diff options
context:
space:
mode:
authorxtraeme <xtraeme@pkgsrc.org>2005-02-18 07:50:49 +0000
committerxtraeme <xtraeme@pkgsrc.org>2005-02-18 07:50:49 +0000
commita784f4abe739db1a1b7491756c1c542bd8a5ea1f (patch)
treedec6d63cc56dc4349eb1ac7ea7280d2f1b631c08 /devel/distcc
parent180ba6f5530caed33737c38ea42f3351de4bf0f6 (diff)
downloadpkgsrc-a784f4abe739db1a1b7491756c1c542bd8a5ea1f.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/distcc')
-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}