RedHat sshd.init script typo ?
Smith, Donald
Donald.Smith at qwest.com
Wed Nov 8 04:54:43 EST 2000
Donald Smith
Staff IP Engineer
IP Network Engineering Security
303-226-9939 Office
303-226-0688 fax
720-320-1537 cell
> -----Original Message-----
> From: Jim Knoble [mailto:jmknoble at jmknoble.cx]
> Sent: Tuesday, November 07, 2000 10:37 AM
> To: openssh-unix-dev at mindrot.org
> Subject: Re: RedHat sshd.init script typo ?
>
>
> Circa 2000-Nov-07 09:57:48 -0700 dixit Smith, Donald :
>
> : 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.
>
> The init script ought to 'exit ${RETVAL}' as its last action; that's
> why to save the value of $? in RETVAL (though i can think of a much
> better name for that variable...).
Ok if you exit
$(The_Return_Value_Of_The_killproc_AND_the_return_value_of_the_rm_Of_the_loc
k)
then I guess this makes sense. Odviously if the lock can't be removed that
error should be
reported also.
>
> --
> jim knoble | jmknoble at jmknoble.cx | http://www.jmknoble.cx/
>
More information about the openssh-unix-dev
mailing list