WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7181
    • My Community Forum
Add getTime.sh to boot
« on: September 20, 2012, 02: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

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Add getTime.sh to boot
« Reply #1 on: September 20, 2012, 08: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: 7181
    • My Community Forum
Re: Add getTime.sh to boot
« Reply #2 on: September 20, 2012, 09:54:25 PM »
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

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

Offline bmarkus

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

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

Offline hiro

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

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7181
    • My Community Forum
Re: Add getTime.sh to boot
« Reply #6 on: October 24, 2012, 01: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 24, 2012, 10:09:47 PM »
This is interesting :)    Can we test this soon??

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7181
    • My Community Forum
Re: Add getTime.sh to boot
« Reply #8 on: October 24, 2012, 10:12:37 PM »
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 24, 2012, 10:24:13 PM »
getTime.sh at boot

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7181
    • My Community Forum
Re: Add getTime.sh to boot
« Reply #10 on: October 24, 2012, 10:27:40 PM »
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 24, 2012, 10:33:53 PM »
Sorry am reading the wrong thread..   

Actually the thread starts as Tiny Core Base.. 
« Last Edit: October 24, 2012, 10:35:42 PM by coreplayer2 »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7181
    • My Community Forum
Re: Add getTime.sh to boot
« Reply #12 on: October 24, 2012, 11:12:06 PM »
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 24, 2012, 11:28:49 PM »
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 24, 2012, 11:31:44 PM by coreplayer2 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Add getTime.sh to boot
« Reply #14 on: October 24, 2012, 11:33:54 PM »
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.?