- Fix hardcoded /etc/rc.subr in rc script [1]
- Update rc script to use USE_RC_SUBR - Bump PORTREVISION - portlint(1) - Drop MAINTAINER [2] PR: 92465 [1] Reported by: Andrew Partan <asp@partan.com> [1] Requested by: Adam <jettea46@yahoo.com> (maintainer via email) [2]
This commit is contained in:
parent
bad8146370
commit
f875469a41
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=155170
@ -7,12 +7,12 @@
|
||||
|
||||
PORTNAME= openradius
|
||||
PORTVERSION= 0.9.10
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= http://www.xs4all.nl/~evbergen/openradius/download/ \
|
||||
http://www.mirrors.wiretapped.net/security/authentication/radius/openradius/
|
||||
|
||||
MAINTAINER= jettea46@yahoo.com
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= A RADIUS server with some actual documentation
|
||||
|
||||
LOGFILE?= /var/log/openradius.log
|
||||
@ -21,7 +21,10 @@ CONFLICTS= freeradius-0.* gnu-radius-1.* radiusd-cistron-1.*
|
||||
|
||||
CC?= gcc
|
||||
CXX?= g++
|
||||
|
||||
USE_GMAKE= yes
|
||||
USE_RC_SUBR= openradius
|
||||
SUB_LIST= LOGFILE="${LOGFILE}"
|
||||
|
||||
OPTIONS= LDAP "With LDAP user database" off
|
||||
|
||||
@ -35,10 +38,6 @@ SCRIPTS_ENV+= USE_LDAP=yes
|
||||
PLIST_SUB+= LDAP="@comment "
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${SED} -e "s|%%PREFIX%%|${PREFIX}|g" -e "s|%%LOGFILE%%|${LOGFILE}|g" \
|
||||
< ${FILESDIR}/openradiusd.sh > ${WRKDIR}/openradiusd.sh
|
||||
|
||||
post-install:
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${DOCSDIR}
|
||||
@ -80,7 +79,8 @@ post-install:
|
||||
${INSTALL} -m 0600 ${WRKSRC}/etc/legacy/${FILE} \
|
||||
${PREFIX}/etc/${PORTNAME}/legacy/${FILE}.sample
|
||||
.endfor
|
||||
@${INSTALL_SCRIPT} ${WRKDIR}/openradiusd.sh ${PREFIX}/etc/rc.d
|
||||
@${ECHO_CMD}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
@${ECHO_CMD}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
29
net/openradius/files/openradius.in
Normal file
29
net/openradius/files/openradius.in
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: openradius
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: FreeBSD
|
||||
#
|
||||
# Add the following line to /etc/rc.conf to enable openradius:
|
||||
#
|
||||
# openradius_enable (bool): Set to "YES" to enable openradius.
|
||||
# Default is "NO".
|
||||
# openradius_flags (flags); Set extra flags to openradius.
|
||||
# Default is "-o %%LOGFILE%%".
|
||||
#
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
name="openradius"
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
load_rc_config ${name}
|
||||
|
||||
: ${openradius_enable="NO"}
|
||||
: ${openradius_flags="-o %%LOGFILE%%"}
|
||||
|
||||
command=%%PREFIX%%/sbin/radiusd
|
||||
|
||||
run_rc_command "$1"
|
@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: radiusd
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: FreeBSD
|
||||
#
|
||||
# Add the following line to /etc/rc.conf to enable radiusd:
|
||||
#
|
||||
# radiusd_enable="YES"
|
||||
#
|
||||
|
||||
radiusd_enable=${radiusd_enable-"NO"}
|
||||
radiusd_flags=${radiusd_flags-"-o %%LOGFILE%%"}
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=radiusd
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
command=%%PREFIX%%/sbin/${name}
|
||||
|
||||
load_rc_config ${name}
|
||||
run_rc_command "$1"
|
@ -1,4 +1,5 @@
|
||||
To enable startup script, please add openradius_enable="YES"
|
||||
in your rc.conf.
|
||||
|
||||
Configuration sample files were installed, you will need to copy
|
||||
these over to create real configuration files.
|
||||
|
||||
|
@ -47,7 +47,6 @@ bin/radclient
|
||||
bin/radtest
|
||||
|
||||
sbin/radiusd
|
||||
etc/rc.d/openradiusd.sh
|
||||
|
||||
%%PORTDOCS%%%%DOCSDIR%%/async-iface-notes
|
||||
%%PORTDOCS%%%%DOCSDIR%%/language.html
|
||||
|
Loading…
Reference in New Issue
Block a user