Dietpi: Clock check?

Created on 1 Mar 2017  ·  7Comments  ·  Source: MichaIng/DietPi

This definitely an enhancement. DietPi is attractive since its leaner all round. I also chose it since I have very poor/unreliable network connectivity as I travel. Often this means that NTP is inaccessible.

On the first boot, Dietpi checks for NTP time and if not received, the system clock is set to the time and date of the OS release. DietPi then rushes off to get updates automatically and you are led to the config and software menu. Unfortunately much of the update and installation will fail since the date of the update and packages is in the future - sometimes by a long way.

Would it be possible to check if the system time is valid (valid NTP update?) before launching into the update cycle to prevent this, albeit quite rare, situation?

Enhancement

Most helpful comment

If it fails on first attempt with currently configured servers, maybe a second try with the global servers at 0.pool.ntp.org or 1.pool.ntp.org is worthy.

All 7 comments

@9H5G

Great idea 👍 i'll flag this for v146 milestone.

If it fails on first attempt with currently configured servers, maybe a second try with the global servers at 0.pool.ntp.org or 1.pool.ntp.org is worthy.

We actually run ntpd with the following cmdline:

   -g no  panicgate      Allow the first adjustment to be Big
                                - may appear multiple times

This should always allow for large adjustments to times, that are much further in the future. I believe the issue is simply ntpd not completing the sync, prior to dietpi-software doing its thing.

I'll add a system which checks for the exit status of ntpd, delay dietpi-software starting any installations accordingly.

OK Dan,

I suspect that the occasional user will still want a way to carry on if his
network does not pernit ntpd to operate correctly though.

Kind Regards
John

On 9 March 2017 at 06:19, Dan notifications@github.com wrote:

We actually run ntpd with the following cmdline:

-g no panicgate Allow the first adjustment to be Big
- may appear multiple times

This should always allow for large adjustments to times, that are much
further in the future. I believe the issue is simply ntpd not completeing
this, prior to dietpi-software doing its thing.

I'll add a system which checks for the exit status of ntpd, delay
dietpi-software starting any installations accordingly.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Fourdee/DietPi/issues/786#issuecomment-285325340, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AM80DRcLxCcQEQThDj296-RxRMTW0_IOks5rj-A4gaJpZM4MPp7R
.

Notes:

  • If dietpi-software is launched and ntpd process is not completed, or, has a non zero exit code (eg: failed):
    image
  • We don't check for non-ntpd/manual timesync setups (eg: systemd-timesyncd)

Completed

@WolfganP

0.pool.ntp.org or 1.pool.ntp.org

If we can use 100.x 101.x lets add these in by default in patch, else, could be tricky to safely patch.


  • 🈯️ Already default on C2 and RPi's, although contains debian., still uses main ntp.org server:
server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst

Marking as completed, again 😃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MichaIng picture MichaIng  ·  3Comments

Fourdee picture Fourdee  ·  3Comments

Fourdee picture Fourdee  ·  3Comments

mok-liee picture mok-liee  ·  3Comments

oshank picture oshank  ·  3Comments