diff options
author | Marcus Alves Grando <mnag@FreeBSD.org> | 2005-11-06 00:07:20 +0000 |
---|---|---|
committer | Marcus Alves Grando <mnag@FreeBSD.org> | 2005-11-06 00:07:20 +0000 |
commit | 7fbd35f4fad2d3bc1ca13527af02ca65a24459dc (patch) | |
tree | a333c71a970e89b256dd9a045e00bf8f22c5f7f8 /devel/distcc/files | |
parent | 05cd42ffd84458f393704d8bcc944e3ceb851af4 (diff) | |
download | ports-7fbd35f4fad2d3bc1ca13527af02ca65a24459dc.tar.gz ports-7fbd35f4fad2d3bc1ca13527af02ca65a24459dc.zip |
Notes
Diffstat (limited to 'devel/distcc/files')
-rw-r--r-- | devel/distcc/files/distccd.sh.in (renamed from devel/distcc/files/distccd.sh.sample) | 14 | ||||
-rw-r--r-- | devel/distcc/files/patch-src-dparent.c.diff | 20 |
2 files changed, 33 insertions, 1 deletions
diff --git a/devel/distcc/files/distccd.sh.sample b/devel/distcc/files/distccd.sh.in index d8237f5e7122..7fb081cbb304 100644 --- a/devel/distcc/files/distccd.sh.sample +++ b/devel/distcc/files/distccd.sh.in @@ -22,7 +22,19 @@ name=distccd 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" diff --git a/devel/distcc/files/patch-src-dparent.c.diff b/devel/distcc/files/patch-src-dparent.c.diff new file mode 100644 index 000000000000..c7eee8e775cf --- /dev/null +++ b/devel/distcc/files/patch-src-dparent.c.diff @@ -0,0 +1,20 @@ +--- src/dparent.c.orig Sun Oct 24 08:05:48 2004 ++++ src/dparent.c Fri Nov 4 17:35:09 2005 +@@ -285,6 +285,9 @@ + **/ + void dcc_remove_pid(void) + { ++ /* distcc user, we are running as, cannot delete files in /var/run ++ */ ++#if 0 + if (!arg_pid_file) + return; + +@@ -292,6 +295,7 @@ + rs_log_warning("failed to remove pid file %s: %s", + arg_pid_file, strerror(errno)); + } ++#endif + } + + |