Hm, I think even in current code, the case
> ... cause issues on rpi with separate rtc. Those boot somewhat slow, and their users don't want the additional time taken by this if they already have a rtc set up.
does not handle like
> They do want the correct time, booting with nortc leaves the time as the epoch...
Because, even using RPi with separate slow RTC, if they do not set "nortc", it just wait until RTC device becomes available anyway.
As in current code, if "nortc" is *not* set then, we have eternal loop until /dev/rtc0 becomes available:
if [ -n "$NORTC" ]; then
echo "${BLUE}Skipping rtc as requested from the boot command line.${NORMAL}"
else
while [ ! -e /dev/rtc0 ]; do usleep 50000; done
if [ -n "$NOUTC" ]; then
/sbin/hwclock -l -s &
else
/sbin/hwclock -u -s &
fi
fi
so if they want to speed up the boot then they have to set "nortc" anyway.
Then in latter of this script,
[ -z "$NORTC" ] || /etc/init.d/settime.sh &
so if "nortc" is set, it won't refer ntpserver to set the time from ntpserver....