(RADIATOR) Patch for radiator.sh to add config file option
Mike McCauley
mikem at open.com.au
Mon Jul 2 17:19:02 CDT 2007
Hello Eric,
Thanks for the patch. It has now been rolled into the base release, and is
also available in the latest patch set.
We appreciate you contribution.
Cheers.
On Tuesday 03 July 2007 04:56, Erik Klavon wrote:
> Hi
>
> I'm using the radiator.sh rc file from the distribution to control
> radiator on a freebsd system. This file works well, except when you
> want to force the configuration file to live somewhere other than the
> default location (/etc/radiator/radius.cfg). What seems like the way
> to go given the current distributed script is the use of the
> radiator_flags option to specify the -config_file command line
> option. The problem is the hard coding of /etc/radiator/radius.cfg as
> a required file. You can get around this by ensuring that this file
> exists, but then you loose this helpful dependency check.
>
> The patch below adds an rc configuration option, radiator_config,
> which defaults to /etc/radiator/radius.cfg. The argument to this
> option (or the default value) is made a required_file and specified on
> the command line with the -config_file option.
>
> I prefer explicitness over succinctness; the diff below does not omit
> the command line option specifying the path to the config file if the
> value matches the default. I don't feel strongly about this point; if
> folks object I'll be happy to add such a check.
>
> Thanks
>
> Erik
>
> --- Radiator-3.17.1/goodies/radiator.sh Tue Nov 15 14:32:15 2005
> +++ /usr/local/etc/rc.d/radiator Mon Jul 2 11:37:47 2007
> @@ -12,6 +12,9 @@
> #
> # And if necessary:
> #
> +#radiator_config="/path/to/radiator.conf"
> +#(default config location is /etc/radiator/radius.cfg)
> +#
> #radiator_flags=""
> #
> # Start /usr/local/etc/rc.d/radiator to see a list of options.
> @@ -22,9 +25,7 @@
> rcvar=`set_rcvar`
> pidfile="/var/run/radiator.pid"
> command="/usr/local/bin/radiusd"
> -command_args="-pid_file=${pidfile}"
> procname="/usr/local/bin/perl"
> -required_files="/etc/radiator/radius.cfg"
> extra_commands="reload"
>
> stop_postcmd=stop_postcmd
> @@ -38,6 +39,11 @@
>
> : ${radiator_enable="NO"}
> : ${radiator_flags=""}
>
> +: ${radiator_config="/etc/radiator/radius.cfg"}
> +
> +required_files="$radiator_config"
> +
> +command_args="-pid_file=${pidfile} -config_file=$radiator_config"
>
> run_rc_command "$1"
>
>
> --
> Archive at http://www.open.com.au/archives/radiator/
> Announcements on radiator-announce at open.com.au
> To unsubscribe, email 'majordomo at open.com.au' with
> 'unsubscribe radiator' in the body of the message.
--
Mike McCauley mikem at open.com.au
Open System Consultants Pty. Ltd Unix, Perl, Motif, C++, WWW
9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.open.com.au
Phone +61 7 5598-7474 Fax +61 7 5598-7070
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
TTLS, PEAP etc on Unix, Windows, MacOS, NetWare etc.
--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.
More information about the radiator
mailing list