aboutsummaryrefslogtreecommitdiff
path: root/net/igmpproxy
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2010-10-31 14:47:29 +0000
committerRene Ladan <rene@FreeBSD.org>2010-10-31 14:47:29 +0000
commit8cc15b705e36083cc68ed5e28d70e8ef5357e1ab (patch)
treec149d9f5a0062811b80e82e90b02e7c60bd49cc5 /net/igmpproxy
parent80d571fabaf7d294a8cbf5e1267b7b85af3ebe97 (diff)
downloadports-8cc15b705e36083cc68ed5e28d70e8ef5357e1ab.tar.gz
ports-8cc15b705e36083cc68ed5e28d70e8ef5357e1ab.zip
- Do not delete the configuration file on deinstall if it was modified [1]
- For the rc script: [2] - use /usr/sbin/daemon to start the rc script because igmpproxy does not daemonize itself - add shutdown keyword - cleanups - Bump PORTREVISION [2] PR: ports/149547 [1], ports/150146 [2] Submitted by: Florian Smeets [flo kasimir.com] [1] [2] Approved by: maintainer timeout (11 weeks [1], 8 weeks [2])
Notes
Notes: svn path=/head/; revision=263839
Diffstat (limited to 'net/igmpproxy')
-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