WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Add getTime.sh to boot  (Read 12946 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Add getTime.sh to boot
« 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.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Add getTime.sh to boot
« Reply #1 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.
10+ Years Contributing to Linux Open Source Projects.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Add getTime.sh to boot
« Reply #2 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.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Add getTime.sh to boot
« Reply #3 on: September 23, 2012, 07:19:19 PM »
Completed.
10+ Years Contributing to Linux Open Source Projects.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Add getTime.sh to boot
« Reply #4 on: September 24, 2012, 12:45:22 AM »
Tested in QEMU, works fine.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Add getTime.sh to boot
« Reply #5 on: October 24, 2012, 03:28:46 PM »
btw, I run my ntp client from /usr/share/udhcpc/default.script

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Add getTime.sh to boot
« Reply #6 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.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Add getTime.sh to boot
« Reply #7 on: October 25, 2012, 01:09:47 AM »
This is interesting :)    Can we test this soon??

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Add getTime.sh to boot
« Reply #8 on: October 25, 2012, 01:12:37 AM »
This is interesting :)    Can we test this soon??

Test what?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Add getTime.sh to boot
« Reply #9 on: October 25, 2012, 01:24:13 AM »
getTime.sh at boot

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Add getTime.sh to boot
« Reply #10 on: October 25, 2012, 01:27:40 AM »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Add getTime.sh to boot
« Reply #11 on: October 25, 2012, 01:33:53 AM »
Sorry am reading the wrong thread..   

Actually the thread starts as Tiny Core Base.. 
« Last Edit: October 25, 2012, 01:35:42 AM by coreplayer2 »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Add getTime.sh to boot
« Reply #12 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. :)
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Add getTime.sh to boot
« Reply #13 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
;)
« Last Edit: October 25, 2012, 02:31:44 AM by coreplayer2 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Add getTime.sh to boot
« Reply #14 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.?