aboutsummaryrefslogtreecommitdiff
path: root/net/radiusd-cistron
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2011-11-19 12:45:18 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2011-11-19 12:45:18 +0000
commitd0fd83948857075a3728f518954ebe4d6822f419 (patch)
treec703f0f0bd9c64efe517e7d4f12aaf87fa928987 /net/radiusd-cistron
parent4a7332689ec85f4b1a6d391bd5770946d649da2c (diff)
downloadports-d0fd83948857075a3728f518954ebe4d6822f419.tar.gz
ports-d0fd83948857075a3728f518954ebe4d6822f419.zip
Notes
Diffstat (limited to 'net/radiusd-cistron')
-rw-r--r--net/radiusd-cistron/Makefile4
-rw-r--r--net/radiusd-cistron/files/patch-radwho.c24
-rw-r--r--net/radiusd-cistron/files/radrelay-cistron.in31
3 files changed, 45 insertions, 14 deletions
diff --git a/net/radiusd-cistron/Makefile b/net/radiusd-cistron/Makefile
index 65182d7897ce..f4133c194d67 100644
--- a/net/radiusd-cistron/Makefile
+++ b/net/radiusd-cistron/Makefile
@@ -7,7 +7,7 @@
PORTNAME= radiusd-cistron
PORTVERSION= 1.6.8
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= ftp://ftp.radius.cistron.nl/pub/radius/
@@ -22,7 +22,7 @@ MAKE_ENV+= RADIUS_DIR="${RADIUS_DIR}"
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
PAMBASE?= etc
-USE_RC_SUBR= radiusd-cistron
+USE_RC_SUBR= radiusd-cistron radrelay-cistron
MAN1= radclient.1 radlast.1 radtest.1 radwho.1 radzap.1
MAN5= clients.5rad naslist.5rad
MAN8= radiusd.8 radrelay.8 radwatch.8
diff --git a/net/radiusd-cistron/files/patch-radwho.c b/net/radiusd-cistron/files/patch-radwho.c
index 73fc5b2c0640..d88c41b4da19 100644
--- a/net/radiusd-cistron/files/patch-radwho.c
+++ b/net/radiusd-cistron/files/patch-radwho.c
@@ -1,5 +1,5 @@
---- src/radwho.c.orig 2003-12-08 17:10:24.000000000 +0100
-+++ src/radwho.c 2010-01-27 07:51:39.000000000 +0100
+--- src/radwho.c.orig 2003-12-09 01:10:24.000000000 +0900
++++ src/radwho.c 2011-10-19 10:22:04.000000000 +0900
@@ -20,6 +20,7 @@
#include <errno.h>
#include <sys/stat.h>
@@ -19,9 +19,9 @@
-char *rfmt1r = "%s,%s,%s,%s%u,%s,%s,%s%s";
+"Login Name What TTY When From Location";
+char *ufmt1 = "%-16.16s %-17.17s %-5.5s %-4.4s %-9.9s %-9.9s %-.*s%s";
-+char *ufmt1r = "%s,%s,%s,%s,%s,%s,%u%s";
++char *ufmt1r = "%s,%s,%s,%s,%s,%s,%*s%s";
+char *rfmt1 = "%-16.16s %-17.17s %-5.5s %s%-3d %-9.9s %-9.9s %-.*s%s";
-+char *rfmt1r = "%s,%s,%s,%s%u,%s,%s,%u%s";
++char *rfmt1r = "%s,%s,%s,%s%u,%s,%s,%*s%s";
+#define FMT1_HOST_SIZE 13
char *hdr2 =
@@ -32,9 +32,9 @@
-char *rfmt2r = "%s,%s%u,%s,%s,%s,%s%s";
+"Login Port What When From Location";
+char *ufmt2 = "%-16.16s %-6.6d %-7.7s %-13.13s %-10.10s %-.*s%s";
-+char *ufmt2r = "%s,%u,%s,%s,%s,%u%s";
++char *ufmt2r = "%s,%u,%s,%s,%s,%*s%s";
+char *rfmt2 = "%-16.16s %s%-5d %-6.6s %-13.13s %-10.10s %-.*s%s";
-+char *rfmt2r = "%s,%s%u,%s,%s,%s,%u%s";
++char *rfmt2r = "%s,%s%u,%s,%s,%s,%*s%s";
+#define FMT2_HOST_SIZE 19
char *eol = "\n";
@@ -106,7 +106,7 @@
+ ttyshort(utx->ut_line),
+ dotime(utx->ut_tv.tv_sec),
+ utx->ut_host,
-+ FMT1_HOST_SIZE + extra_width,
++ (rawoutput == 0 ? FMT1_HOST_SIZE + extra_width : 0),
+ myname, eol);
+ else
+ printf((rawoutput==0? ufmt2:ufmt2r),
@@ -115,7 +115,7 @@
+ "shell",
+ dotime(utx->ut_tv.tv_sec),
+ utx->ut_host,
-+ FMT2_HOST_SIZE + extra_width,
++ (rawoutput == 0 ? FMT2_HOST_SIZE + extra_width : 0),
+ myname, eol);
+ }
+
@@ -153,7 +153,7 @@
dotime(ut.ut_time),
#endif
ut.ut_host,
-+ FMT1_HOST_SIZE + extra_width,
++ (rawoutput == 0 ? FMT1_HOST_SIZE + extra_width : 0),
myname, eol);
else
printf((rawoutput==0? ufmt2:ufmt2r),
@@ -166,7 +166,7 @@
dotime(ut.ut_time),
#endif
ut.ut_host,
-+ FMT2_HOST_SIZE + extra_width,
++ (rawoutput == 0 ? FMT2_HOST_SIZE + extra_width : 0),
myname, eol);
}
}
@@ -180,7 +180,7 @@
portind, portno,
dotime(rt.time),
nasname(ntohl(rt.nas_address)),
-+ FMT1_HOST_SIZE + extra_width,
++ (rawoutput == 0 ? FMT1_HOST_SIZE + extra_width : 0),
hostname(rt.framed_address), eol);
else
printf((rawoutput == 0? rfmt2: rfmt2r),
@@ -188,7 +188,7 @@
proto(rt.proto, rt.porttype),
dotime(rt.time),
nasname(ntohl(rt.nas_address)),
-+ FMT2_HOST_SIZE + extra_width,
++ (rawoutput == 0 ? FMT2_HOST_SIZE + extra_width : 0),
hostname(rt.framed_address), eol);
}
}
diff --git a/net/radiusd-cistron/files/radrelay-cistron.in b/net/radiusd-cistron/files/radrelay-cistron.in
new file mode 100644
index 000000000000..5a4faa5b4177
--- /dev/null
+++ b/net/radiusd-cistron/files/radrelay-cistron.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: radrelay-cistron
+# REQUIRE: LOGIN radiusd-cistron
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# radrelay_enable (bool): Set it to "YES" to enable radrelay.
+# Default is "NO".
+# radrelay_flags (flags): Set extra flags to radrelay.
+# Default is "". see radrelay(1).
+#
+
+. /etc/rc.subr
+
+name="radrelay"
+rcvar=${name}_enable
+
+command=%%PREFIX%%/sbin/${name}
+pidfile=/var/run/${name}.pid
+
+load_rc_config $name
+
+: ${radrelay_enable="NO"}
+: ${radrelay_flags=""}
+
+run_rc_command "$1"