From f022f03a1c25b5eb7a5ccaedae1963a655c03e21 Mon Sep 17 00:00:00 2001 From: Roman Bogorodskiy Date: Fri, 21 Aug 2009 18:55:12 +0000 Subject: Improve USE_RC_SUBR usage. PR: 136849 Submitted by: pgollucci --- security/scanlogd/Makefile | 12 +++--------- security/scanlogd/files/scanlogd.in | 25 +++++++++++++++++++++++++ security/scanlogd/files/scanlogd.sh | 25 ------------------------- 3 files changed, 28 insertions(+), 34 deletions(-) create mode 100644 security/scanlogd/files/scanlogd.in delete mode 100644 security/scanlogd/files/scanlogd.sh (limited to 'security/scanlogd') diff --git a/security/scanlogd/Makefile b/security/scanlogd/Makefile index 1c9ae569be66..908a0b5cc1b4 100644 --- a/security/scanlogd/Makefile +++ b/security/scanlogd/Makefile @@ -7,6 +7,7 @@ PORTNAME= scanlogd PORTVERSION= 2.2.6 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= http://openwall.com/scanlogd/ \ ftp://ftp.openwall.com/pub/projects/scanlogd/ \ @@ -15,7 +16,7 @@ MASTER_SITES= http://openwall.com/scanlogd/ \ MAINTAINER= novel@FreeBSD.org COMMENT= TCP port scan detection tool -USE_RC_SUBR= yes +USE_RC_SUBR= ${PORTNAME} .if defined(WITH_LIBNIDS) BUILD_DEPENDS+= ${LOCALBASE}/lib/libnids.a:${PORTSDIR}/net/libnids @@ -26,20 +27,13 @@ ALL_TARGET= libpcap MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS} -c" LD="${CC}" MAN8= scanlogd.8 -PLIST_FILES= bin/scanlogd \ - etc/rc.d/scanlogd.sh - -RC_SCRIPTS_SUB= PREFIX=${PREFIX} \ - RC_SUBR=${RC_SUBR} +PLIST_FILES= bin/scanlogd do-install: ${INSTALL_PROGRAM} ${WRKSRC}/scanlogd ${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/scanlogd.8 ${MANPREFIX}/man/man8 post-install: - @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ - ${FILESDIR}/scanlogd.sh > ${PREFIX}/etc/rc.d/scanlogd.sh - @${CHMOD} ${BINMODE} ${PREFIX}/etc/rc.d/scanlogd.sh @${CAT} ${PKGMESSAGE} .include diff --git a/security/scanlogd/files/scanlogd.in b/security/scanlogd/files/scanlogd.in new file mode 100644 index 000000000000..532249fcfcb3 --- /dev/null +++ b/security/scanlogd/files/scanlogd.in @@ -0,0 +1,25 @@ +#!/bin/sh + +# Start or stop scanlogd +# $FreeBSD$ + +# PROVIDE: scanlogd +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable scanlogd: +# scanlogd_enable="YES" +# scanlogd_flags="" + +scanlogd_enable=${scanlogd_enable:-"NO"} # Enable scanlogd + +. %%RC_SUBR%% + +name="scanlogd" +rcvar=`set_rcvar` +command="%%PREFIX%%/bin/${name}" +required_files="" + +load_rc_config $name +run_rc_command "$1" diff --git a/security/scanlogd/files/scanlogd.sh b/security/scanlogd/files/scanlogd.sh deleted file mode 100644 index 532249fcfcb3..000000000000 --- a/security/scanlogd/files/scanlogd.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -# Start or stop scanlogd -# $FreeBSD$ - -# PROVIDE: scanlogd -# REQUIRE: DAEMON -# BEFORE: LOGIN -# KEYWORD: shutdown - -# Add the following lines to /etc/rc.conf to enable scanlogd: -# scanlogd_enable="YES" -# scanlogd_flags="" - -scanlogd_enable=${scanlogd_enable:-"NO"} # Enable scanlogd - -. %%RC_SUBR%% - -name="scanlogd" -rcvar=`set_rcvar` -command="%%PREFIX%%/bin/${name}" -required_files="" - -load_rc_config $name -run_rc_command "$1" -- cgit v1.2.3