]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ntp: Move configuration into an own file
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 30 Oct 2020 15:07:26 +0000 (15:07 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 30 Oct 2020 15:08:44 +0000 (15:08 +0000)
We should not write files like that in the LFS scripts.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/ntp/ntp.conf [new file with mode: 0644]
lfs/ntp

diff --git a/config/ntp/ntp.conf b/config/ntp/ntp.conf
new file mode 100644 (file)
index 0000000..cb75a53
--- /dev/null
@@ -0,0 +1,5 @@
+disable monitor
+restrict default nomodify noquery
+server  127.127.1.0 prefer
+fudge   127.127.1.0 stratum 10
+driftfile /etc/ntp/drift
diff --git a/lfs/ntp b/lfs/ntp
index 3c4a97033cab3f98d01a27a46c02f58fd986158a..7a10f1737c0aefadf6dbbb835c3b6e5d19c8266e 100644 (file)
--- a/lfs/ntp
+++ b/lfs/ntp
@@ -83,11 +83,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 
        -mkdir /etc/ntp
        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 prefer"       >> /etc/ntp.conf
-       echo "fudge   127.127.1.0 stratum 10"   >> /etc/ntp.conf
-       echo "driftfile /etc/ntp/drift"         >> /etc/ntp.conf
+       install -v -m 644 $(DIR_SRC)/config/ntp/ntp.conf /etc/ntp.conf
 
        #Enable it by default...
        cp -vf $(DIR_SRC)/config/time/* /var/ipfire/time/