Tiny Core Base > TCB Bugs

TC9.0 /etc/init.d/settime.sh broken

<< < (3/4) > >>

bmarkus:

--- Quote from: y_satou70 on July 25, 2018, 01:23:27 PM ---so if "nortc" is set, it won't refer ntpserver to set the time from ntpserver....

--- End quote ---

For RPi nortc is the default in command line. If there is Ethernet connected and network is up, RPi system time is set up during boot from NTP server.

y_satou70:
I see, so on RPi, it runs /etc/init.d/settime.sh -> /usr/bin/getTime.sh  by default.
then still not sure why we need to skip 2015 or later if we see on OS/kernel clock. shouldn't it be controlled by ntpserver boot option is set or not ...?

Greg Erskine:
Hi y_satou70.

ntpserver bootcode:


--- Code: ---Define alternative Network Time Protocol (ntp) server
<ntpserver=xxx.xxx.xxx.xxx> or <ntpserver=FQDN>
Default: pool.ntp.org
--- End code ---

regards
Greg

y_satou70:
yeah, I meant, if ntpserver=..... is set in boot option then it should always try to set time by NTP with specified ntpserver in bootoption, regardless what time currently OS/kernel has.

* If the system does not have RTC, then simply set "nortc". then it skip the logic to set OS/kernel clock from RTC/hardware clock (in /etc/init.d/tc-config)
* If system (regardless it's x86 or RPi) wants to set OS/kernel clock by NTP, then set ntpserver=... in boot option. And if this option is specified then it should sync the clock by NTP with using NTP server which is specified in ntpserver=... option., and regardless the time which RTC/hadware clock has.

that is my proposal and code diff for /etc/init.d/settime.sh

And,

> I believe that would 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. So conflicting requirements somewhat.

I'm afraid not following this part - "those boot somewhat slow" - slow for becoming RTC device available from OS ? or slow for syncing OS/kernel clock with ntpserver by /usr/bin/ntpd ?

curaga:
Removing the date check as in your patch would result in systems that didn't need a NTP check now doing one. I agree that if the user gave a ntpserver= bootcode, then the NTP check should happen no matter what the time was. We'd need the proper logic for that - marking it as set in tc-config and then testing for this in the date check in setTime.sh.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version