diff options
author | xtraeme <xtraeme@pkgsrc.org> | 2005-02-18 07:50:49 +0000 |
---|---|---|
committer | xtraeme <xtraeme@pkgsrc.org> | 2005-02-18 07:50:49 +0000 |
commit | aa847746b11a90e124fdcd9fd17912482791c20f (patch) | |
tree | dec6d63cc56dc4349eb1ac7ea7280d2f1b631c08 /devel | |
parent | dcd0db3e2f1ba984a87d54fc53f1c8b34180f847 (diff) | |
download | pkgsrc-aa847746b11a90e124fdcd9fd17912482791c20f.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-x | devel/distcc/files/distccd.sh | 13 |
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} |