RedHat sshd.init script typo ?

Pekka Savola pekkas at netcore.fi
Wed Nov 8 04:15:22 EST 2000


On Tue, 7 Nov 2000, Smith, Donald  wrote:
> Why bother assigning RETVAL then comparing it to 0. How about a comment
> explaining $?
> # The return value from killproc is stored in $? (normal sh behavior) then
> 				[ $? -eq 0 ] && rm -f /var/lock/subsys/sshd
> >                 fi
> >                 echo
> This saves an assignment helps newbies understand that in borneshell $? is
> the decimal value returned by the last synchronously executed command.

Assignment is not a big deal -- more readable than comments here :-)

And it's used in there throughout the script.  You couldn't use $? in
every other circumstance there.


-- 
Pekka Savola                 "Tell me of difficulties surmounted,
Pekka.Savola at netcore.fi      not those you stumble over and fall"






More information about the openssh-unix-dev mailing list