From e7f50e1c181bad14787a4b995875ed63b79adf5d Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 8 Feb 2013 10:49:37 +1100 Subject: - (djm) [contrib/redhat/sshd.init] treat RETVAL as an integer; patch from Iain Morgan in bz#2059 --- contrib/redhat/sshd.init | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'contrib/redhat/sshd.init') diff --git a/contrib/redhat/sshd.init b/contrib/redhat/sshd.init index e9a751796..40c8dfd9f 100755 --- a/contrib/redhat/sshd.init +++ b/contrib/redhat/sshd.init @@ -29,7 +29,7 @@ do_restart_sanity_check() { $SSHD -t RETVAL=$? - if [ ! "$RETVAL" = 0 ]; then + if [ $RETVAL -ne 0 ]; then failure $"Configuration file or keys are invalid" echo fi @@ -49,7 +49,7 @@ start() echo -n $"Starting $prog:" $SSHD $OPTIONS && success || failure RETVAL=$? - [ "$RETVAL" = 0 ] && touch /var/lock/subsys/sshd + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sshd echo } @@ -58,7 +58,7 @@ stop() echo -n $"Stopping $prog:" killproc $SSHD -TERM RETVAL=$? - [ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/sshd + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sshd echo } @@ -87,7 +87,7 @@ case "$1" in condrestart) if [ -f /var/lock/subsys/sshd ] ; then do_restart_sanity_check - if [ "$RETVAL" = 0 ] ; then + if [ $RETVAL -eq 0 ] ; then stop # avoid race sleep 3 -- cgit v1.2.3