diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rwxr-xr-x | contrib/redhat/sshd.init | 12 |
2 files changed, 15 insertions, 1 deletions
@@ -3,6 +3,8 @@ - (djm) Sync scard/ stuff - (djm) Redhat spec file cleanups from Pekka Savola <pekkas@netcore.fi> and Redhat + - (djm) Redhat initscript config sanity checking from Pekka Savola + <pekkas@netcore.fi> 20010914 - (bal) OpenBSD CVS Sync @@ -6434,4 +6436,4 @@ - Wrote replacements for strlcpy and mkdtemp - Released 1.0pre1 -$Id: ChangeLog,v 1.1517 2001/09/15 11:01:41 djm Exp $ +$Id: ChangeLog,v 1.1518 2001/09/15 11:03:10 djm Exp $ diff --git a/contrib/redhat/sshd.init b/contrib/redhat/sshd.init index efedbfb8..86b040cd 100755 --- a/contrib/redhat/sshd.init +++ b/contrib/redhat/sshd.init @@ -96,6 +96,16 @@ do_dsa_keygen() { fi fi } +do_restart_sanity_check() { + sshd -t + RETVAL=$? + if [ ! "$RETVAL" = 0 ]; then + my_failure "Configuration file or keys" + echo + exit $RETVAL + fi +} + case "$1" in start) @@ -127,12 +137,14 @@ case "$1" in echo ;; restart) + do_restart_sanity_check $0 stop $0 start RETVAL=$? ;; condrestart) if [ -f /var/lock/subsys/sshd ] ; then + do_restart_sanity_check $0 stop $0 start RETVAL=$? |