The 'reload' actions for rc.d script suggests that application will try to reload configuration without restarting itself (and thus disconnecting all current users). While for most daemons 'reload' behaves that way, in openssh it just causes server to restart. Moreover, it doesn't even check whether the config is correct, so it can cause openssh to not start again. Such behavior is simply misguiding and can cause serious issues. In my opinion we should remove 'reload' function from rc.d to avoid misuse. I think we can also use the function as 'restart' as this is what it does.
Hm that's true, it does restart the server rather than HUP it to reload config. I don't see why it doesn't just send a HUP... Thanks for the report, assigning to maintainers.
the init.d script's reload() does send the HUP signal only. it doesnt restart the daemon. the behavior you're complaining about most likely is with sshd, not the init.d script. reload() { ebegin "Reloading ${SVCNAME}" start-stop-daemon --stop --signal HUP --oknodo \ --exec "${SSHD_BINARY}" --pidfile "${SSHD_PIDFILE}" eend $? } # pgrep -f -l /usr/sbin/sshd 9065 /usr/sbin/sshd # kill -HUP 9065 # pgrep -f -l /usr/sbin/sshd 9076 /usr/sbin/sshd we can add a call to 'checkconfig' to the top of the reload() function, but we're not going to drop it
(In reply to comment #2) > we can add a call to 'checkconfig' to the top of the reload() function, but > we're not going to drop it I think that would be a good solution.
added to cvs then http://sources.gentoo.org/net-misc/openssh/files/sshd.rc6?r1=1.25&r2=1.26