diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2010-01-24 15:14:04 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2010-01-24 15:14:04 +0000 |
commit | 6f788a75d29f10643cf039075c12180eec7def78 (patch) | |
tree | c6419baa65734616fc9ea5804883b02772dfa47d /net/radiusd-cistron | |
parent | 749ad12c6dbd7f52a2ed00fbcf8b09da02124809 (diff) | |
download | ports-6f788a75d29f10643cf039075c12180eec7def78.tar.gz ports-6f788a75d29f10643cf039075c12180eec7def78.zip |
Notes
Diffstat (limited to 'net/radiusd-cistron')
-rw-r--r-- | net/radiusd-cistron/Makefile | 19 | ||||
-rw-r--r-- | net/radiusd-cistron/files/radiusd-cistron.in | 30 | ||||
-rw-r--r-- | net/radiusd-cistron/files/radiusd-cistron.sh | 22 | ||||
-rw-r--r-- | net/radiusd-cistron/pkg-message | 4 | ||||
-rw-r--r-- | net/radiusd-cistron/pkg-plist | 1 |
5 files changed, 47 insertions, 29 deletions
diff --git a/net/radiusd-cistron/Makefile b/net/radiusd-cistron/Makefile index bae157ee24f8..6fbae032765d 100644 --- a/net/radiusd-cistron/Makefile +++ b/net/radiusd-cistron/Makefile @@ -7,6 +7,7 @@ PORTNAME= radiusd-cistron PORTVERSION= 1.6.8 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= ftp://ftp.cistron.nl/pub/people/miquels/radius/ @@ -14,12 +15,14 @@ MAINTAINER= dinoex@FreeBSD.org COMMENT= A RADIUS-compliant remote authentication and accounting server CONFLICTS?= freeradius-0.* gnu-radius-1.* openradius-0.* + MAKEFILE= Makefile.BSD RADIUS_DIR= ${PREFIX}/etc/raddb MAKE_ENV+= RADIUS_DIR="${RADIUS_DIR}" WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} PAMBASE?= etc +USE_RC_SUBR= radiusd-cistron MAN1= radclient.1 radlast.1 radtest.1 radwho.1 radzap.1 MAN5= clients.5rad naslist.5rad MAN8= radiusd.8 radrelay.8 radwatch.8 @@ -32,11 +35,6 @@ do-build: do-install: cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} ${MAKE} -f ${MAKEFILE} install - ${SED} -e "s=%%PREFIX%%=${PREFIX}=" \ - ${FILESDIR}/radiusd-cistron.sh \ - > ${WRKSRC}/radiusd-cistron.sh - ${INSTALL_SCRIPT} ${WRKSRC}/radiusd-cistron.sh \ - ${PREFIX}/etc/rc.d/radiusd-cistron.sh @${MKDIR} -m 700 /var/log/radacct ${INSTALL_MAN} ${WRKSRC}/doc/radlast.1 ${MANPREFIX}/man/man1 ${INSTALL_MAN} ${WRKSRC}/doc/radtest.1 ${MANPREFIX}/man/man1 @@ -60,4 +58,13 @@ PLIST_SUB+= WITH_PAMD="@comment " .endif PLIST_SUB+= PAMBASE="/${PAMBASE}" -.include <bsd.port.mk> +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} >= 900007 +BROKEN= needs utmp.h +.endif + +.include <bsd.port.post.mk> diff --git a/net/radiusd-cistron/files/radiusd-cistron.in b/net/radiusd-cistron/files/radiusd-cistron.in new file mode 100644 index 000000000000..f597e403f7c8 --- /dev/null +++ b/net/radiusd-cistron/files/radiusd-cistron.in @@ -0,0 +1,30 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: radiusd-cistron +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# radiusd_enable (bool): Set to NO by default. +# Set it to YES to enable radiusd-cistron. +# + +. /etc/rc.subr + +name="radiusd" +rcvar=${name}_enable + +command=%%PREFIX%%/sbin/${name} +pidfile=/var/run/${name}.pid + +load_rc_config $name + +: ${radiusd_enable="NO"} + +command_args="-y" + +run_rc_command "$1" diff --git a/net/radiusd-cistron/files/radiusd-cistron.sh b/net/radiusd-cistron/files/radiusd-cistron.sh deleted file mode 100644 index 1ec7d0d2248d..000000000000 --- a/net/radiusd-cistron/files/radiusd-cistron.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -case "$1" in -start) - [ -x %%PREFIX%%/sbin/radiusd ] && - %%PREFIX%%/sbin/radiusd -y && - echo -n ' radiusd' - ;; -stop) - if test -e /var/run/radiusd.pid - then - kill `head -1 /var/run/radiusd.pid` - rm -f /var/run/radiusd.pid - fi - ;; -*) - echo "Usage: ${0##*/} { start | stop }" >&2 - exit 64 - ;; -esac diff --git a/net/radiusd-cistron/pkg-message b/net/radiusd-cistron/pkg-message new file mode 100644 index 000000000000..9213223b989d --- /dev/null +++ b/net/radiusd-cistron/pkg-message @@ -0,0 +1,4 @@ +================================================= +To start cistron radiusd automaticall during boot +add radiusd_enable="YES" to /etc/rc.conf +================================================= diff --git a/net/radiusd-cistron/pkg-plist b/net/radiusd-cistron/pkg-plist index aec0d0ff5fbc..eb31301c2df4 100644 --- a/net/radiusd-cistron/pkg-plist +++ b/net/radiusd-cistron/pkg-plist @@ -11,7 +11,6 @@ etc/raddb/naslist.sample etc/raddb/naspasswd.sample etc/raddb/realms.sample etc/raddb/users.sample -etc/rc.d/radiusd-cistron.sh sbin/checkrad sbin/radiusd sbin/radrelay |