[LEDE-DEV] [PATCH] base-files: rc.common: fix enable() return code and logic
Roman Yeryomin
roman at advem.lv
Fri Dec 22 02:51:19 PST 2017
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.
Regards,
Roman
More information about the Lede-dev
mailing list