Tiny Core Base > TCB Bugs
getTime.sh not working at startup
patrikg:
Some doc's in TC doesn't have being updated for long time.
I see in the wiki it has:
https://wiki.tinycorelinux.net/doku.php?id=wiki:boot_options#deprecated_boot_options
Stefann:
Note, I am very well aware tiny core is run by volunteers, and with great respect I very much like the project.
It's a bit too much for me to volunteer as maintainer, but I took the time to minutely report my findings especially with the intend to help others.
With that said:
I feel current wiki text is not correct, this text (and more information I did find on this forum before posting) brought me to start this topic with title "geTime.sh not working at startup".
current wiki on nortc bootcode says: "Set UTC time at boot, internet required"
This is not correct: the nortc bootcode will NOT set UTC if rtc is present, it only does that if no functional rtc is present.
Suggestion: "use if no rtc (real time clock) present, to set UTC time at boot without functional rtc"
Alternatively change settime.sh to comply with current wiki text (not tested suggestion to initialize to unrealistic value to force internet sync):
code snippet:
--- Code: ---................
do
[ $((CNT++)) -gt 60 ] && break || sleep 1
done
if [ $CNT -le 60 ]
then
CNT=9999
NRT=0
#suggested addition (not tested)
#force system clock to unrealistic value to trigger waiting for successful internet sync
sudo date 010101012010
while sleep 0
do
XXX=$(/bin/date -I)
XXX=${XXX:0:4}
# this comparison breaks out with functional rtc without the above suggested addition
if [ "$XXX" -ge "2015" ];
then
break
fi
..........
--- End code ---
Note:
personally I would change the wiki, not settime.sh because the sync adds boottime which I donot want to spend if I have a functional rtc.
However... I think it makes sense to add a bootcode like "ntpd" that enforces "sudo ntpd -p pool.ntp.org". This does not only sync systemtime but also syncs the rtc to have a "good start from rtc" at next boot. I will now do that in bootlocal.sh but as ntpd is already in the package starting ntpd with a standard bootcode would be nice
So.... I kind of hope some maintainer can fix the wiki. and maybe copy ntpd bootcode suggestion in TC17.
And if not: it will help those struggling with the issue and search the forum.
Juanito:
You should be able to edit the wiki yourself?
Stefann:
I think I cannot > just checked the page and don't think I have editing rights.
If I click "page source" I get: "This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong."
note: I have never in my lifetime edited a wiki page so I may do something wrong
(also: can I just "do" that? not stepping on toes?)
Rich:
Hi Stefann
--- Quote from: Stefann on May 04, 2025, 02:03:40 PM ---I think I cannot ...
--- End quote ---
Now you can. :)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version