WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Missing ntpdate or ntpclient in picore 7.0  (Read 3353 times)

Offline fault-tolerant

  • Newbie
  • *
  • Posts: 19
Missing ntpdate or ntpclient in picore 7.0
« on: January 31, 2016, 02:43:41 AM »
Can't seem to find any means of getting time from NTP server in picore 7.0. In x86 tinycore I have the ntpclient. Should I compile it from source? Anyone did that already? I also noticed this function can be included in the busybox at compile time. Can I suggest that, especially for the Raspberry Pi?
« Last Edit: January 31, 2016, 02:52:25 AM by fault-tolerant »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Missing ntpdate or ntpclient in picore 7.0
« Reply #1 on: January 31, 2016, 02:51:46 AM »
BusyBox ntpd is included in base. It is used to setup time from ntp server during startup. Try.
Béla
Ham Radio callsign: HA5DI

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

Offline fault-tolerant

  • Newbie
  • *
  • Posts: 19
Re: Missing ntpdate or ntpclient in picore 7.0
« Reply #2 on: January 31, 2016, 03:21:13 AM »
Thank, @bmarkus, however I'm actually after a CLI tool to manually set the time rather than a daemon. I'm trying to port our java application to RaPi2 with piCore, and it manages the timekeeping by itself. On Ubuntu it used to work with ntpdate. If there's no other option, I will try to work with ntpd, of course.
By the way, I mentioned compiling - is there a compiletc.tcz for piCore to quickly set up the environment?
« Last Edit: January 31, 2016, 03:32:16 AM by fault-tolerant »

Offline jgrulich

  • Sr. Member
  • ****
  • Posts: 341
    • GRULICH DESIGN - R&D Lab.
Re: Missing ntpdate or ntpclient in picore 7.0
« Reply #3 on: January 31, 2016, 03:56:51 AM »
When used default network config, than the ntpd is automatically started just after dhcp execution.
When used static IP setup, you need to start it manually with:

Code: (bash) [Select]
# Set the time
/etc/init.d/settime.sh

From my practice, this build in ntpd is working much better than ntp, or ntpdate, even on highly secured networks.

Quote
By the way, I mentioned compiling - is there a compiletc.tcz for piCore to quickly set up the environment?

For sure, there is compile-essentials.tcz and other stuff for feature-rich compiling.
Hence you're newbie, please take a look around the forum for more info how this nice community works.

Offline fault-tolerant

  • Newbie
  • *
  • Posts: 19
Re: Missing ntpdate or ntpclient in picore 7.0
« Reply #4 on: January 31, 2016, 05:48:05 AM »
Thanks, @jgrulich! I will follow your advice. piCore is somewhat different indeed, but I shall catch up with it.

UPDATE:
Of course, ntpd has the -q option. And there are the helper scripts settime.sh and getTime.sh.
Thanks again.
« Last Edit: January 31, 2016, 05:56:06 AM by fault-tolerant »