On 26/01/2016 21:35, Petr Štetiar wrote:
> Bastian Bittorf <bitt...@bluebottle.com> [2016-01-21 12:53:48]:
> 
>> * Petr Štetiar <yn...@true.cz> [21.01.2016 12:22]:
>>>  boot() {
>>> +   [ -e "$RTC_DEV" ] && [ -e "$HWCLOCK" ] && $HWCLOCK -s -f $RTC_DEV && 
>>> exit 0
>>
>> thank you! can you please do in this line a:
>> && return
> 
> Like following?
> 
>       deps_ok && $HWCLOCK -s -f $RTC_DEV && exit 0 && return 
> 
> Is it really needed? I've always thought, that exit will terminate the script
> so the return wouldn't be called anyway.
> 
>> and introduce a helper (maybe overengineered 8-)
> 
> Kind of, was thinking about it also so I'll change it, thanks.
> 
>> deps_ok() {
>>      [ -e "$RTC_DEV" ] && [ -e "$HWCLOCK" ]
>> }
> 
> -- ynezz

please don't add a helper. instead just call start from boot, honour its
return code and then decide if you want to run the exising code.

        John

> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to