[OpenWrt-Devel] [PATCH v3] base-files: For sysfixtime use hwclock if RTC available
John Crispin
blogic at openwrt.org
Wed Jan 27 02:05:46 EST 2016
On 26/01/2016 21:35, Petr Štetiar wrote:
> Bastian Bittorf <bittorf at bluebottle.com> [2016-01-21 12:53:48]:
>
>> * Petr Štetiar <ynezz at 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 at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list