[LEDE-DEV] [PATCH] base-files: rc.common: fix enable() return code and logic

Karl Palsson karlp at tweak.net.au
Tue Dec 26 00:39:38 PST 2017


Roman Yeryomin <roman at advem.lv> wrote:
> On 2017-12-21 21:35, Roman Yeryomin wrote:
> > In current state, if there is STOP but no START, enbale()
> > will return 0 (success), which is wrong.
> > Moreover there is no need to check for START/STOP twice.
> > Instead, add err variable to save success state and
> > and return it's value.
> > Also eliminate the need to disable() by using 'ln -sf',
> > which will first delete the old symlink if one exists.
> > 
> 
> Ah, mistake in description, if there is no STOP it returns 1,
> which is wrong. Will resend with corrected description.

What do you mean? Are you saying that "enable" doesn't work if
STOP isn't defined? because that's clearly not the case...


> 
> Regards,
> Roman
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.html
Type: application/pgp-signature
Size: 1161 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20171226/ef9315f2/attachment.sig>


More information about the Lede-dev mailing list