diff options
Diffstat (limited to 'mail/smtptrapd/files')
-rw-r--r-- | mail/smtptrapd/files/patch-smtptrapd.c | 25 | ||||
-rw-r--r-- | mail/smtptrapd/files/smtptrapd.sh | 30 |
2 files changed, 55 insertions, 0 deletions
diff --git a/mail/smtptrapd/files/patch-smtptrapd.c b/mail/smtptrapd/files/patch-smtptrapd.c new file mode 100644 index 000000000000..0ba2820481db --- /dev/null +++ b/mail/smtptrapd/files/patch-smtptrapd.c @@ -0,0 +1,25 @@ +--- smtptrapd.c.orig Sun Mar 20 00:01:06 2005 ++++ smtptrapd.c Sun Mar 20 00:01:36 2005 +@@ -27,9 +27,9 @@ + #include <sys/time.h> + #include <sys/types.h> + #include <unistd.h> ++#include <netinet/in.h> + #include <arpa/inet.h> + #include <sys/socket.h> +-#include <netinet/in.h> + #include <errno.h> + #include <string.h> + #include <sysexits.h> +@@ -491,7 +491,11 @@ + /* background the process */ + if (fork()) exit(0); + if (fork()) exit(0); ++#ifdef __FreeBSD__ ++ setpgrp(0, 0); ++#else + setpgrp(); ++#endif + + openlog("smtptrapd", LOG_PID, LOG_MAIL); + diff --git a/mail/smtptrapd/files/smtptrapd.sh b/mail/smtptrapd/files/smtptrapd.sh new file mode 100644 index 000000000000..44b2f6dec8e4 --- /dev/null +++ b/mail/smtptrapd/files/smtptrapd.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: smtptrapd +# REQUIRE: LOGIN +# BEFORE: mail +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable smtptrapd: +# +#smtptrapd_enable="YES" +# +# Run smtptrapd -h for flags +# + +. %%RC_SUBR%% + +name=smtptrapd +rcvar=`set_rcvar` + +command=%%PREFIX%%/bin/smtptrapd + +smtptrapd_enable=${smtptrapd_enable:-"NO"} +smtptrapd_flags=${smtptrapd_flags:-"-c /var/run/smtptrapd-root"} + +load_rc_config $name +run_rc_command "$1" |