WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: settime getTime.sh confusion and problems  (Read 1988 times)

Offline gutmensch

  • Administrator
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
settime getTime.sh confusion and problems
« on: November 03, 2010, 03:00:15 PM »
I'm referring to tc 3.2 and ran into a problem after time went back to CET.

One first question came up when looking at tc-config:

SETTIME is set to the evaluation of the settime= boot code. Why is that? Shouldn't it be like cron or noutc in the section, where it's just set to 1 when it's given at all since there's no parameter given to getTime.sh later in tc-config. If I understand it correctly just the boot code settime doesn't work because SETTIME is set empty afterwards and [ -n "$SETTIME" ] evaluates to 1. But settime=bla works.

Another thing is the connection to the time server - I get a name resolution failure on boot from nc, surely the network is not right up at this moment.
pause shows error: "nc: bad address 'time-nw.nist.gov'.





If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: settime getTime.sh confusion and problems
« Reply #1 on: November 03, 2010, 05:07:21 PM »
I can see your confusion. settime as shown in the boot code help screen does not take a parameter
.
Yet, apparently, when the boot code parsing routine was changed in tc-config settime was moved to the parameter section not the flag section. Was the move intended to accept a time server name, and if so why not pass to getTime.sh as it does accept a parameter.

However, it still could be problematic as those without hard wired net connection would still see a failure. The settime boot code is only useful when net access is available early in the boot process. Which for wireless is often much later /opt/bootlocal.sh
10+ Years Contributing to Linux Open Source Projects.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: settime getTime.sh confusion and problems
« Reply #2 on: November 05, 2010, 10:21:05 AM »
I have removed settime boot code. Use getTime.sh with optional local time server as argument for automatic time set. Use this after net access is established. 

Or use Control Panel->Date/Time to set time manually. 

The repository also contains additional time setting utilities.
10+ Years Contributing to Linux Open Source Projects.