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 @@ | |||
3 | - (djm) Sync scard/ stuff | 3 | - (djm) Sync scard/ stuff |
4 | - (djm) Redhat spec file cleanups from Pekka Savola <pekkas@netcore.fi> and | 4 | - (djm) Redhat spec file cleanups from Pekka Savola <pekkas@netcore.fi> and |
5 | Redhat | 5 | Redhat |
6 | - (djm) Redhat initscript config sanity checking from Pekka Savola | ||
7 | <pekkas@netcore.fi> | ||
6 | 8 | ||
7 | 20010914 | 9 | 20010914 |
8 | - (bal) OpenBSD CVS Sync | 10 | - (bal) OpenBSD CVS Sync |
@@ -6434,4 +6436,4 @@ | |||
6434 | - Wrote replacements for strlcpy and mkdtemp | 6436 | - Wrote replacements for strlcpy and mkdtemp |
6435 | - Released 1.0pre1 | 6437 | - Released 1.0pre1 |
6436 | 6438 | ||
6437 | $Id: ChangeLog,v 1.1517 2001/09/15 11:01:41 djm Exp $ | 6439 | $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 efedbfb85..86b040cda 100755 --- a/contrib/redhat/sshd.init +++ b/contrib/redhat/sshd.init | |||
@@ -96,6 +96,16 @@ do_dsa_keygen() { | |||
96 | fi | 96 | fi |
97 | fi | 97 | fi |
98 | } | 98 | } |
99 | do_restart_sanity_check() { | ||
100 | sshd -t | ||
101 | RETVAL=$? | ||
102 | if [ ! "$RETVAL" = 0 ]; then | ||
103 | my_failure "Configuration file or keys" | ||
104 | echo | ||
105 | exit $RETVAL | ||
106 | fi | ||
107 | } | ||
108 | |||
99 | 109 | ||
100 | case "$1" in | 110 | case "$1" in |
101 | start) | 111 | start) |
@@ -127,12 +137,14 @@ case "$1" in | |||
127 | echo | 137 | echo |
128 | ;; | 138 | ;; |
129 | restart) | 139 | restart) |
140 | do_restart_sanity_check | ||
130 | $0 stop | 141 | $0 stop |
131 | $0 start | 142 | $0 start |
132 | RETVAL=$? | 143 | RETVAL=$? |
133 | ;; | 144 | ;; |
134 | condrestart) | 145 | condrestart) |
135 | if [ -f /var/lock/subsys/sshd ] ; then | 146 | if [ -f /var/lock/subsys/sshd ] ; then |
147 | do_restart_sanity_check | ||
136 | $0 stop | 148 | $0 stop |
137 | $0 start | 149 | $0 start |
138 | RETVAL=$? | 150 | RETVAL=$? |