Patch to add /etc/default/freeradius to debian package

Matthew Newton mcn4 at leicester.ac.uk
Wed Jan 11 17:00:27 CET 2012


Hi,

Another simple patch - this one adds /etc/default/freeradius to
the debian package to allow daemon options to be easily set.

I sent the patch to Debian and it was included a year or so ago
(closed debian bug #564716), but not yet in the main distribution.

https://github.com/mcnewton/freeradius-server/commit/5d0d6d23b27949ba8c35049ae5008bd4b9ebf748

Cheers!

Matthew



commit 5d0d6d23b27949ba8c35049ae5008bd4b9ebf748
Author: Matthew Newton <mcn4 at leicester.ac.uk>
Date:   Wed Jan 11 15:40:52 2012 +0000

    Add /etc/default/freeradius to debian package
    
    This gives an easy way to supply options to the daemon when
    starting it using the init.d script.

diff --git a/debian/freeradius.default b/debian/freeradius.default
new file mode 100644
index 0000000..1c31908
--- /dev/null
+++ b/debian/freeradius.default
@@ -0,0 +1,3 @@
+# Options for the FreeRADIUS deamon.
+#FREERADIUS_OPTIONS="-d /etc/freeradius"
+
diff --git a/debian/freeradius.init b/debian/freeradius.init
index 0738914..985c044 100755
--- a/debian/freeradius.init
+++ b/debian/freeradius.init
@@ -21,6 +21,10 @@ PROGRAM="/usr/sbin/freeradius"
 PIDFILE="/var/run/freeradius/freeradius.pid"
 DESCR="FreeRADIUS daemon"
 
+if [ -r /etc/default/$PROG ]; then
+  . /etc/default/$PROG
+fi
+
 test -f $PROGRAM || exit 0
 
 # /var/run may be a tmpfs
@@ -36,7 +40,7 @@ ret=0
 case "$1" in
         start)
                 log_daemon_msg "Starting $DESCR" "$PROG"
-                start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $PROGRAM || ret=$?
+                start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $PROGRAM -- $FREERADIUS_OPTIONS || ret=$?
                 log_end_msg $ret
                 exit $ret
                 ;;

-- 
Matthew Newton, Ph.D. <mcn4 at le.ac.uk>

Systems Architect (UNIX and Networks), Network Services,
I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom

For IT help contact helpdesk extn. 2253, <ithelp at le.ac.uk>



More information about the Freeradius-Devel mailing list