- (djm) [contrib/redhat/sshd.init] treat RETVAL as an integer;

patch from Iain Morgan in bz#2059
This commit is contained in:
Damien Miller 2013-02-08 10:49:37 +11:00
parent 5c3bbd76aa
commit e7f50e1c18
2 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,8 @@
20100207 20130208
- (djm) [contrib/redhat/sshd.init] treat RETVAL as an integer;
patch from Iain Morgan in bz#2059
20130207
- (djm) [configure.ac] Don't probe seccomp capability of running kernel - (djm) [configure.ac] Don't probe seccomp capability of running kernel
at configure time; the seccomp sandbox will fall back to rlimit at at configure time; the seccomp sandbox will fall back to rlimit at
runtime anyway. Patch from plautrba AT redhat.com in bz#2011 runtime anyway. Patch from plautrba AT redhat.com in bz#2011

View File

@ -29,7 +29,7 @@ do_restart_sanity_check()
{ {
$SSHD -t $SSHD -t
RETVAL=$? RETVAL=$?
if [ ! "$RETVAL" = 0 ]; then if [ $RETVAL -ne 0 ]; then
failure $"Configuration file or keys are invalid" failure $"Configuration file or keys are invalid"
echo echo
fi fi
@ -49,7 +49,7 @@ start()
echo -n $"Starting $prog:" echo -n $"Starting $prog:"
$SSHD $OPTIONS && success || failure $SSHD $OPTIONS && success || failure
RETVAL=$? RETVAL=$?
[ "$RETVAL" = 0 ] && touch /var/lock/subsys/sshd [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sshd
echo echo
} }
@ -58,7 +58,7 @@ stop()
echo -n $"Stopping $prog:" echo -n $"Stopping $prog:"
killproc $SSHD -TERM killproc $SSHD -TERM
RETVAL=$? RETVAL=$?
[ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/sshd [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sshd
echo echo
} }
@ -87,7 +87,7 @@ case "$1" in
condrestart) condrestart)
if [ -f /var/lock/subsys/sshd ] ; then if [ -f /var/lock/subsys/sshd ] ; then
do_restart_sanity_check do_restart_sanity_check
if [ "$RETVAL" = 0 ] ; then if [ $RETVAL -eq 0 ] ; then
stop stop
# avoid race # avoid race
sleep 3 sleep 3