From e3f81a2a84a49dc899febaf6bef61638ecc35866 Mon Sep 17 00:00:00 2001 From: rene Date: Sun, 31 Oct 2010 14:47:29 +0000 Subject: - 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]) --- net/igmpproxy/Makefile | 5 +---- net/igmpproxy/files/igmpproxy.in | 13 +++++++++++-- net/igmpproxy/pkg-plist | 4 ++++ 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 net/igmpproxy/pkg-plist (limited to 'net') 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 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 -- cgit