Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 194794 | Differences between
and this patch

Collapse All | Expand All

(-)freeradius-1.1.7.orig/scripts/check-radiusd-config.in (-1 / +30 lines)
Lines 13-18 Link Here
13
#  AUTHOR: Alan DeKok <aland@ox.org>
13
#  AUTHOR: Alan DeKok <aland@ox.org>
14
#          Wed Apr 12 15:21:51 EDT 2000
14
#          Wed Apr 12 15:21:51 EDT 2000
15
#
15
#
16
#  Used the "port" configuration item in radiusd.conf rather than radiusd's
17
#  "-p" option, which is no longer supported as of freeradius-1.0.0.
18
#  Without apologies, this script requires ksh and perl.  It is a hack on
19
#  a hack, and not worth more effort since a proper configuration file
20
#  checking option for radiusd (such as "-C") would probably be the best
21
#  solution.
22
#   - Dave Plonka <plonka AT doit DOT wisc DOT edu>, Feb  1, 2005
23
#
24
#  Edited Dave Ploka's modifcations to work with bash rather than ksh
25
#   - Matt Courtney <matt AT matt DOT net DOT nz>, Oct 5, 2007
16
26
17
prefix=@prefix@
27
prefix=@prefix@
18
exec_prefix=@exec_prefix@
28
exec_prefix=@exec_prefix@
Lines 35-41 Link Here
35
#  Note that you might have to add a '-d raddb' to the command line
45
#  Note that you might have to add a '-d raddb' to the command line
36
#  options, if your database is somewhere other than /etc/raddb
46
#  options, if your database is somewhere other than /etc/raddb
37
#
47
#
38
$sbindir/radiusd -X -p 32768 > startup.log 2>&1 &
48
49
TMPCONFIG=/tmp/$(basename "$0")."$$"
50
51
trap 'rm -rf "${TMPCONFIG}"; exit' EXIT
52
trap 'rm -rf "${TMPCONFIG}"; exit 1' TERM INT HUP KILL
53
54
#
55
# Duplicate raddbdir to a temporary directory
56
#
57
if ! `mkdir "${TMPCONFIG}" && cp -rp "${raddbdir}" "${TMPCONFIG}" && cd "${TMPCONFIG}"`; then
58
    exit 1
59
fi
60
61
#
62
# Since radiusd's "-p" option is no longer supported as of freeradius-1.0.0,
63
# edit lines that look like "port = n" to test radiusd on port 32768 instead:
64
#
65
perl -pi -e 's/^(port\s*=\s*)\d+/${1}32768/' "${TMPCONFIG}/$(basename ${raddbdir})/radiusd.conf"
66
67
$sbindir/radiusd -X -d "${TMPCONFIG}/$(basename ${raddbdir})/" > startup.log 2>&1 &
39
68
40
#
69
#
41
#  Remember what it's process ID was.
70
#  Remember what it's process ID was.

Return to bug 194794