aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/igmpproxy/Makefile5
-rw-r--r--net/igmpproxy/files/igmpproxy.in13
-rw-r--r--net/igmpproxy/pkg-plist4
3 files changed, 16 insertions, 6 deletions
diff --git a/net/igmpproxy/Makefile b/net/igmpproxy/Makefile
index 7e5379f30b92..5c54c013f4eb 100644
--- a/net/igmpproxy/Makefile
+++ b/net/igmpproxy/Makefile
@@ -7,6 +7,7 @@
PORTNAME= igmpproxy
PORTVERSION= 0.1
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
@@ -24,8 +25,4 @@ GNU_CONFIGURE= yes
MAN5= igmpproxy.conf.5
MAN8= igmpproxy.8
-PLIST_FILES= sbin/igmpproxy \
- etc/igmpproxy.conf \
- etc/igmpproxy.conf.sample
-
.include <bsd.port.mk>
diff --git a/net/igmpproxy/files/igmpproxy.in b/net/igmpproxy/files/igmpproxy.in
index 75b2381d2cf2..68a5b878b9d7 100644
--- a/net/igmpproxy/files/igmpproxy.in
+++ b/net/igmpproxy/files/igmpproxy.in
@@ -5,19 +5,28 @@
# PROVIDE: igmpproxy
# REQUIRE: NETWORKING
+# KEYWORD: shutdown
# The following variables are provided to control startup of igmpproxy
# rc configuration file (eg /etc/rc.conf):
# igmpproxy_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable igmpproxy.
+# igmpproxy_conf (path): Set full path to configuration file.
+# Default is "%%PREFIX%%/etc/igmpproxy.conf"
. /etc/rc.subr
name="igmpproxy"
rcvar=`set_rcvar`
-command="%%PREFIX%%/sbin/${name}"
+procname="%%PREFIX%%/sbin/${name}"
+command=/usr/sbin/daemon
required_files="%%PREFIX%%/etc/igmpproxy.conf"
-igmpproxy_enable=${igmpproxy_enable-"NO"}
load_rc_config $name
+
+igmpproxy_enable=${igmpproxy_enable-"NO"}
+igmpproxy_conf=${igmpproxy_config-"%%PREFIX%%/etc/igmpproxy.conf"}
+
+command_args=" -cf $procname $igmpproxy_conf"
+
run_rc_command "$1"
diff --git a/net/igmpproxy/pkg-plist b/net/igmpproxy/pkg-plist
new file mode 100644
index 000000000000..c0c075e5db68
--- /dev/null
+++ b/net/igmpproxy/pkg-plist
@@ -0,0 +1,4 @@
+sbin/igmpproxy
+@unexec if cmp -s %D/etc/igmpproxy.conf.sample %D/etc/igmpproxy.conf; then rm -f %D/etc/igmpproxy.conf; fi
+etc/igmpproxy.conf.sample
+@exec if [ ! -f %D/etc/igmpproxy.conf ]; then cp -p %D/%F %B/igmpproxy.conf; fi