[SSSD] [PATCH] SYSV: Do not call functions success and fail itself

Jakub Hrozek jhrozek at redhat.com
Thu Mar 20 19:19:49 UTC 2014


On Thu, Mar 20, 2014 at 06:00:57PM +0100, Lukas Slebodnik wrote:
> 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

OK, then I think this patch is fine. It also works fine on my RHEL6.5
test machine.

ACK



More information about the sssd-devel mailing list