On Thu, 15 Nov 2018, Dmitry Bogatov wrote:
>
> I am aware, that this bug is 9 years old. I partially applied this
> patch. See `b6022b1' at https://salsa.debian.org/debian/sysvinit.
Still, things happen ;)
> > Similar with above. Inverting logic will keep you on the right path.
> >
> > - cd /var/log && {
> > + ! cd /var/log || {
> > chgrp adm boot || :
>
> No. It is harder to understand.
The point I was trying to make is that with code like this:
cd /var/log && {
... do stuff ...
}
^
after the closed curly bracket above, if $? is _not_ 0 either the `cd'
command failed or some stuff inside the command list. But with:
! cd /var/log || {
... do stuff ...
}
^
at this point, if $? is _not_ 0 then you can be sure some stuff inside
the command list failed.
Cheers,
--
Cristian