aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrene <rene@FreeBSD.org>2010-10-31 22:47:29 +0800
committerrene <rene@FreeBSD.org>2010-10-31 22:47:29 +0800
commite3f81a2a84a49dc899febaf6bef61638ecc35866 (patch)
tree2c56a08f1c362981c7128ab73c63d3f16a5ea76a /net
parente52a086e43c16c84791910aac66544fd577a1492 (diff)
downloadfreebsd-ports-gnome-e3f81a2a84a49dc899febaf6bef61638ecc35866.tar.gz
freebsd-ports-gnome-e3f81a2a84a49dc899febaf6bef61638ecc35866.tar.zst
freebsd-ports-gnome-e3f81a2a84a49dc899febaf6bef61638ecc35866.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])
Diffstat (limited to 'net')
-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