]> git.ipfire.org Git - people/meitelwein/ipfire-2.x.git/commitdiff
ntp: Prefer local clock
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 15 Dec 2015 12:49:27 +0000 (12:49 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 15 Dec 2015 12:49:27 +0000 (12:49 +0000)
For some reason, ntp won't use a local clock even if it is
there and up and running. Therefore we need to "prefer" our
only source of time.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Tested-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
lfs/ntp

diff --git a/lfs/ntp b/lfs/ntp
index 7c23a3c4077a8be422fa546197e5b8e5c1a1a211..2d04b17ba02dab9ad6e3f6a4e13459071c79b5fd 100644 (file)
--- a/lfs/ntp
+++ b/lfs/ntp
@@ -86,7 +86,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        chown -R ntp:ntp /etc/ntp
        echo "disable monitor" > /etc/ntp.conf
        echo "restrict default nomodify noquery" >>  /etc/ntp.conf
-       echo "server  127.127.1.0"                      >> /etc/ntp.conf
+       echo "server  127.127.1.0 prefer"       >> /etc/ntp.conf
        echo "fudge   127.127.1.0 stratum 10"   >> /etc/ntp.conf
        echo "driftfile /etc/ntp/drift"         >> /etc/ntp.conf