Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: bmarkus on September 20, 2012, 05:14:18 AM

Title: Add getTime.sh to boot
Post by: bmarkus on September 20, 2012, 05:14:18 AM
Due to lack of RTC system starts with LINUX Time Zero. Please add getTime.sh to boot process.
Title: Re: Add getTime.sh to boot
Post by: roberts on September 20, 2012, 11:40:45 PM
I don't think I can assume that the system would be connected to the internet.
In the most simple form adding:

until /usr/bin/getTime.sh; do
   sleep 3
done

to /opt/bootlocal.sh to run in background or
to cause the system to wait until time request is satisfied add to /opt/bootsync.sh

But perhaps would be safer to use a control loop counter around the getTiime.sh call.
Title: Re: Add getTime.sh to boot
Post by: bmarkus on September 21, 2012, 12:54:25 AM
Yes, you can't expect network will be available, best is running a loop in background with few tries only, starting after udhcpd invoked.

BTW, Raspbian is running ntpd in the background.
Title: Re: Add getTime.sh to boot
Post by: roberts on September 23, 2012, 07:19:19 PM
Completed.
Title: Re: Add getTime.sh to boot
Post by: bmarkus on September 24, 2012, 12:45:22 AM
Tested in QEMU, works fine.
Title: Re: Add getTime.sh to boot
Post by: hiro on October 24, 2012, 03:28:46 PM
btw, I run my ntp client from /usr/share/udhcpc/default.script
Title: Re: Add getTime.sh to boot
Post by: bmarkus on October 24, 2012, 04:16:22 PM
It helps to get system time. However time is updated when system is up and running, so you see files with Linux Time Zero in the base. Doesn't harm.
Title: Re: Add getTime.sh to boot
Post by: coreplayer2 on October 25, 2012, 01:09:47 AM
This is interesting :)    Can we test this soon??
Title: Re: Add getTime.sh to boot
Post by: bmarkus on October 25, 2012, 01:12:37 AM
This is interesting :)    Can we test this soon??

Test what?
Title: Re: Add getTime.sh to boot
Post by: coreplayer2 on October 25, 2012, 01:24:13 AM
getTime.sh at boot
Title: Re: Add getTime.sh to boot
Post by: bmarkus on October 25, 2012, 01:27:40 AM
getTime.sh at boot

In piCore?
Title: Re: Add getTime.sh to boot
Post by: coreplayer2 on October 25, 2012, 01:33:53 AM
Sorry am reading the wrong thread..   

Actually the thread starts as Tiny Core Base.. 
Title: Re: Add getTime.sh to boot
Post by: bmarkus on October 25, 2012, 02:12:06 AM
Actually the thread starts as Tiny Core Base..

Starts as

Quote
Due to lack of RTC system starts with LINUX Time Zero. Please add getTime.sh to boot process.

No Tiny Core Base mentioned. :)
Title: Re: Add getTime.sh to boot
Post by: coreplayer2 on October 25, 2012, 02:28:49 AM
jeez..

Under
    Tiny Core Linux »
    Recent Unread Topics

When selecting "Show unread posts since last visit." so wouldn't know which thread any post is located..

but a quick glance at the cookie crumbs indicates Tiny Core Base

    Tiny Core Linux »
    Tiny Core Base »
    Army Core »
    Raspberry Pi »
    Add getTime.sh to boot



Which can catch any unsuspecting reader by surprise
;)
Title: Re: Add getTime.sh to boot
Post by: coreplayer2 on October 25, 2012, 02:33:54 AM
Anyhow, now I'm curious,  how is the getTime script initialized??   manually??  have never seen the time auto updated, maybe this is something I need to configure.?

Title: Re: Add getTime.sh to boot
Post by: hiro on October 25, 2012, 02:53:40 AM
Code: [Select]
root@fh:~# grep -r getTime /etc
/etc/etc/init.d/settime.sh: until /usr/bin/getTime.sh >/dev/null 2>&1
root@fh:~# grep -r settime.sh /etc
/etc/init.d/rcS: [ -z "$NORTC" ] || /etc/init.d/settime.sh &
/etc/init.d/tc-config: [ -z "$NORTC" ] || /etc/init.d/settime.sh &
Title: Re: Add getTime.sh to boot
Post by: coreplayer2 on October 25, 2012, 03:23:10 AM
Thank you Hiro,  I see settime.sh  calls  getTime.sh 

will have to investigate why my time is not updated

 8)
Title: Re: Add getTime.sh to boot
Post by: hiro on October 25, 2012, 03:47:32 AM
you might experience the same problem as me, that the server does not respond most of the time, and it is only tried once.

I just sync to my local ntp server with ntpclient.tcz instead.