[Pkg-freeradius-maintainers] Bug#931920: freeradius: Init script does not stop daemon
Benjamin Boudoir
benjamin.boudoir at ircam.fr
Fri Jul 12 11:21:30 BST 2019
Package: freeradius
Version: 3.0.17+dfsg-1.1
Severity: normal
Dear Maintainer,
The program path is not set in init script when invoking killproc, which is requiered by the LSB spec.
Therefore, a "/etc/init.d/freeradius stop" does not stop the daemon as intended (at least, when using sysvinit).
Modified init script is included in the bug report.
Regards,
-- System Information:
Debian Release: 10.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-5-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages freeradius depends on:
ii freeradius-common 3.0.17+dfsg-1.1
ii freeradius-config 3.0.17+dfsg-1.1
ii libc6 2.28-10
ii libcap2 1:2.25-2
ii libct4 1.00.104-1
ii libfreeradius3 3.0.17+dfsg-1.1
ii libgdbm6 1.18.1-4
ii libpam0g 1.3.1-5
ii libpcre3 2:8.39-12
ii libperl5.28 5.28.1-6
ii libreadline7 7.0-5
ii libsqlite3-0 3.27.2-3
ii libssl1.1 1.1.1c-1
ii libtalloc2 2.1.14-2
ii libwbclient0 2:4.9.5+dfsg-5
ii lsb-base 10.2019051400
Versions of packages freeradius recommends:
ii freeradius-utils 3.0.17+dfsg-1.1
Versions of packages freeradius suggests:
pn freeradius-krb5 <none>
pn freeradius-ldap <none>
pn freeradius-mysql <none>
pn freeradius-postgresql <none>
pn freeradius-python2 <none>
ii snmp 5.7.3+dfsg-5
-- Configuration Files:
/etc/init.d/freeradius changed:
PROG="freeradius"
PROGRAM="/usr/sbin/freeradius"
PIDFILE="/var/run/freeradius/freeradius.pid"
DESCR="FreeRADIUS daemon"
set -e
. /lib/lsb/init-functions
configtest() {
log_action_begin_msg "Checking $DESCR configuration"
out=`$PROGRAM -Cxl stdout $FREERADIUS_OPTIONS`; ret=$?
out=`echo "${out}" | tail -n 1 | sed 's/^\s*ERROR:\s*\(.*\)\s*$/\1/'`
log_action_end_msg $ret "$out"
return $ret
}
if [ -r /etc/default/$PROG ]; then
. /etc/default/$PROG
fi
test -f $PROGRAM || exit 0
if [ ! -d /var/run/freeradius ]; then
mkdir -p /var/run/freeradius
chown freerad:freerad /var/run/freeradius
fi
if [ -d "$FREERADIUS_CONF_LOCAL" -a -z "$FREERADIUS_OPTIONS" ]; then
FREERADIUS_OPTIONS="-d $FREERADIUS_CONF_LOCAL"
fi
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
ret=0
case "$1" in
start)
log_daemon_msg "Starting $DESCR" "$PROG"
# eval allows quoted arguments (config directories for example) to be passed in $FREERADIUS_OPTIONS
eval "start_daemon -p '$PIDFILE' '$PROGRAM' $FREERADIUS_OPTIONS" || ret=$?
log_end_msg $ret
;;
stop)
log_daemon_msg "Stopping $DESCR" "$PROG"
killproc -p "$PIDFILE" "$PROGRAM" || ret=$?
log_end_msg $ret
;;
restart|force-reload)
configtest || exit 150
$0 stop
$0 start
;;
reload)
configtest || exit 150
if status_of_proc -p "$PIDFILE" "$PROG" "$DESCR"; then
log_daemon_msg "Reloading $DESCR" "$PROG"
start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE || ret=$?
log_end_msg $ret
fi
;;
configtest|testconfig)
configtest || exit 150
;;
debug)
$0 status
if [ $? -eq 0 ]; then
echo "$PROGRAM already running; for live debugging see raddebug(8)"
exit 151
fi
$PROGRAM -X $FREERADIUS_OPTIONS || exit $?
;;
debug-threaded)
$0 status
if [ $? -eq 0 ]; then
echo "$PROGRAM already running; for live debugging see raddebug(8)"
exit 151
fi
$PROGRAM -f -xx -l stdout $FREERADIUS_OPTIONS || exit $?
;;
status)
status_of_proc -p "$PIDFILE" "$PROGRAM" "$PROG" && exit 0 || exit $?
;;
*)
echo "Usage: $0 start|stop|restart|force-reload|reload|configtest|debug|debug-threaded|status"
exit 1
;;
esac
exit $ret
-- no debconf information
More information about the Pkg-freeradius-maintainers
mailing list