Index: Makefile =================================================================== RCS file: /home/ncvs/ports/devel/distcc/Makefile,v retrieving revision 1.44 diff -u -r1.44 Makefile --- Makefile 12 Jan 2005 04:31:32 -0000 1.44 +++ Makefile 16 Oct 2005 10:05:29 -0000 @@ -7,6 +7,7 @@ PORTNAME= distcc PORTVERSION= 2.18.3 +PORTREVISION= 1 CATEGORIES= devel ipv6 MASTER_SITES= http://distcc.samba.org/ftp/distcc/ Index: files/distccd.sh.sample =================================================================== RCS file: /home/ncvs/ports/devel/distcc/files/distccd.sh.sample,v retrieving revision 1.4 diff -u -r1.4 distccd.sh.sample --- files/distccd.sh.sample 12 Jan 2005 04:31:32 -0000 1.4 +++ files/distccd.sh.sample 16 Oct 2005 10:05:29 -0000 @@ -22,7 +22,19 @@ rcvar=`set_rcvar` command=%%PREFIX%%/sbin/${name} -pidfile=%%DISTCCD_PIDFILE%% +# extract pid file from distccd_flags (if any) +pidfile="`echo ${distccd_flags} |sed -nE -e 's/^.*-P ([^ ]+).*$/\1/p'`" +# set default value +pidfile=${pidfile:-%%DISTCCD_PIDFILE%%} + +distccd_precmd() +{ + # distccd drops root privileges and then attempts to create the pid file + touch ${pidfile} + chown distcc:distcc ${pidfile} +} + +start_precmd="distccd_precmd" load_rc_config ${name} run_rc_command "$1"