ports/143149: [PATCH] net/radiusd-cistron: add new rc script
Sevan Janiyan
venture37 at geeklan.co.uk
Sun Jan 24 07:30:02 UTC 2010
>Number: 143149
>Category: ports
>Synopsis: [PATCH] net/radiusd-cistron: add new rc script
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Jan 24 07:30:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Sevan Janiyan
>Release: FreeBSD 8.0-RELEASE-p2 amd64
>Organization:
>Environment:
System: FreeBSD newbie.thingamajig-systems.co.uk 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan 5 21:11:58 UTC
>Description:
Added file(s):
- pkg-message
- files/radiusd-cistron.in
Removed file(s):
- files/radiusd-cistron.sh
Port maintainer (dinoex at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:
--- radiusd-cistron-1.6.8.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net/radiusd-cistron/Makefile,v
retrieving revision 1.33
diff -u -r1.33 Makefile
--- Makefile 23 Dec 2007 08:46:17 -0000 1.33
+++ Makefile 24 Jan 2010 07:21:16 -0000
@@ -26,17 +26,13 @@
DOCFILES= COPYRIGHT INSTALL doc/ChangeLog doc/README doc/README.Y2K \
doc/README.cisco doc/README.pam doc/README.proxy \
doc/README.simul doc/README.usersfile
+USE_RC_SUBR= radiusd-cistron
do-build:
cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} ${MAKE} -f ${MAKEFILE}
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 +56,7 @@
.endif
PLIST_SUB+= PAMBASE="/${PAMBASE}"
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
.include <bsd.port.mk>
Index: pkg-message
===================================================================
RCS file: pkg-message
diff -N pkg-message
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg-message 24 Jan 2010 07:21:16 -0000
@@ -0,0 +1,4 @@
+=================================================
+To start cistron radiusd automaticall during boot
+add radiusd_enable="YES" to /etc/rc.conf
+=================================================
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/net/radiusd-cistron/pkg-plist,v
retrieving revision 1.13
diff -u -r1.13 pkg-plist
--- pkg-plist 31 Jan 2006 15:55:58 -0000 1.13
+++ pkg-plist 24 Jan 2010 07:21:16 -0000
@@ -11,7 +11,6 @@
etc/raddb/naspasswd.sample
etc/raddb/realms.sample
etc/raddb/users.sample
-etc/rc.d/radiusd-cistron.sh
sbin/checkrad
sbin/radiusd
sbin/radrelay
Index: files/radiusd-cistron.in
===================================================================
RCS file: files/radiusd-cistron.in
diff -N files/radiusd-cistron.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/radiusd-cistron.in 24 Jan 2010 07:21:16 -0000
@@ -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"
Index: files/radiusd-cistron.sh
===================================================================
RCS file: files/radiusd-cistron.sh
diff -N files/radiusd-cistron.sh
--- files/radiusd-cistron.sh 4 Dec 2003 03:24:09 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/net/radiusd-cistron/files/radiusd-cistron.sh,v 1.2 2003/12/04 03:24:09 dinoex Exp $
-#
-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
--- radiusd-cistron-1.6.8.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list