On (20/03/14 17:28), Jakub Hrozek wrote:
On Thu, Mar 20, 2014 at 04:43:44PM +0100, Lukas Slebodnik wrote:
> ehlo,
>
> Bash function daemon will call success or fail. It is useless to call them
> one more time. It may cause strange behaviour with some configurations of
> terminal.
>
> # service sssd restart
> Stopping sssd: [ OK ]
> [ OK ] sssd: [ OK ]
>
> Resolves:
>
https://fedorahosted.org/sssd/ticket/2280
>
> sh-4.1# grep -Rn daemon /etc/init.d/ | grep failure
> /etc/init.d/sssd:46: daemon $SSSD -f -D && success || failure
> sh-4.1# grep -Rn daemon /etc/init.d/ | grep success
> /etc/init.d/sssd:46: daemon $SSSD -f -D && success || failure
>
> sh-4.1# ls -1 /etc/init.d/ | wc -l
> 57
>
> simple patch is attached.
>
> LS
This is exactly the same patch that I quickly hacked on Jan's system, so
I'm included to ACK it.
Do you know what terminal configurations might cause this? I couldn't
reproduce the bug easily on my RHEL6.5 machine.
I couldn't find a difference between two machines.
Frankly, I didn't try very much. It doesn't worth because only
sssd had this pattern: (daemon ... && success || failure)
LS