summaryrefslogtreecommitdiff
path: root/net-dialup/cistronradius/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-dialup/cistronradius/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-dialup/cistronradius/files')
-rw-r--r--net-dialup/cistronradius/files/cistronradius-1.6.8-gcc41.patch11
-rw-r--r--net-dialup/cistronradius/files/cistronradius.rc34
2 files changed, 45 insertions, 0 deletions
diff --git a/net-dialup/cistronradius/files/cistronradius-1.6.8-gcc41.patch b/net-dialup/cistronradius/files/cistronradius-1.6.8-gcc41.patch
new file mode 100644
index 000000000000..7600df739c7b
--- /dev/null
+++ b/net-dialup/cistronradius/files/cistronradius-1.6.8-gcc41.patch
@@ -0,0 +1,11 @@
+diff -Nru radiusd-cistron-1.6.8.orig/src/radiusd.h radiusd-cistron-1.6.8/src/radiusd.h
+--- radiusd-cistron-1.6.8.orig/src/radiusd.h 2003-12-08 18:12:22.000000000 +0200
++++ radiusd-cistron-1.6.8/src/radiusd.h 2006-09-21 15:33:05.000000000 +0300
+@@ -204,7 +204,6 @@
+ extern char *radwtmp_path;
+ extern UINT4 expiration_seconds;
+ extern UINT4 warning_seconds;
+-extern int radius_pid;
+ extern int use_dbm;
+ extern int use_dns;
+ extern int use_wtmp;
diff --git a/net-dialup/cistronradius/files/cistronradius.rc b/net-dialup/cistronradius/files/cistronradius.rc
new file mode 100644
index 000000000000..9155ee59b6a5
--- /dev/null
+++ b/net-dialup/cistronradius/files/cistronradius.rc
@@ -0,0 +1,34 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -x /usr/sbin/radiusd ] ; then
+ eerror "The radius daemon was not found."
+ eerror "Please (re)emerge cistronradius."
+ return 1
+ fi
+
+ if [ ! -e /etc/raddb/clients ] ; then
+ eerror "No /etc/raddb/clients file found."
+ eerror "Please create the file and retry."
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting Cistron Radius"
+ start-stop-daemon --start --quiet --exec /usr/sbin/radiusd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Cistron Radius"
+ start-stop-daemon --stop --quiet --pidfile /var/run/radiusd.pid
+ eend $?
+}