pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/distcc/files Before starting distcc, ${DISTCC_PI...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/51b749e63de3
branches:  trunk
changeset: 489171:51b749e63de3
user:      xtraeme <xtraeme%pkgsrc.org@localhost>
date:      Fri Feb 18 07:50:49 2005 +0000

description:
Before starting distcc, ${DISTCC_PIDDIR} must exist and must have the
correct permissions.

Reported by jtc@ in the tech-pkg mailing list.

diffstat:

 devel/distcc/files/distccd.sh |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (36 lines):

diff -r 3e2ab76a0116 -r 51b749e63de3 devel/distcc/files/distccd.sh
--- a/devel/distcc/files/distccd.sh     Fri Feb 18 07:17:13 2005 +0000
+++ b/devel/distcc/files/distccd.sh     Fri Feb 18 07:50:49 2005 +0000
@@ -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 @@
 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 @@
 else
        case ${1:-start} in
        start)
+               distcc_precmd
                if [ -x ${command} ]; then
                        echo "Starting ${name}."
                        eval ${command} ${distccd_flags} ${command_args}



Home | Main Index | Thread Index | Old Index