summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-02-08 10:49:37 +1100
committerDamien Miller <djm@mindrot.org>2013-02-08 10:49:37 +1100
commite7f50e1c181bad14787a4b995875ed63b79adf5d (patch)
tree3222a5cdefd988c210070edc0e171fe2e0d1311b /contrib
parent5c3bbd76aa5c6f050e7b4606ea55efce3d46e054 (diff)
- (djm) [contrib/redhat/sshd.init] treat RETVAL as an integer;
patch from Iain Morgan in bz#2059
Diffstat (limited to 'contrib')
-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 e9a75179..40c8dfd9 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