summaryrefslogtreecommitdiffstats
path: root/contrib/redhat/sshd.init
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-02-08 00:49:37 +0100
committerDamien Miller <djm@mindrot.org>2013-02-08 00:49:37 +0100
commite7f50e1c181bad14787a4b995875ed63b79adf5d (patch)
tree3222a5cdefd988c210070edc0e171fe2e0d1311b /contrib/redhat/sshd.init
parent - (djm) [configure.ac] Don't probe seccomp capability of running kernel (diff)
downloadopenssh-e7f50e1c181bad14787a4b995875ed63b79adf5d.tar.xz
openssh-e7f50e1c181bad14787a4b995875ed63b79adf5d.zip
- (djm) [contrib/redhat/sshd.init] treat RETVAL as an integer;
patch from Iain Morgan in bz#2059
Diffstat (limited to 'contrib/redhat/sshd.init')
-rwxr-xr-xcontrib/redhat/sshd.init8
1 files changed, 4 insertions, 4 deletions
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