Made sure there's a default config that's 'sane'
This commit is contained in:
parent
d7449cc887
commit
7e85002dcb
|
|
@ -249,6 +249,12 @@ class Installer:
|
||||||
def activate_ntp(self):
|
def activate_ntp(self):
|
||||||
self.log('Installing and activating NTP.', level=logging.INFO)
|
self.log('Installing and activating NTP.', level=logging.INFO)
|
||||||
self.enable_service('systemd-timesyncd'):
|
self.enable_service('systemd-timesyncd'):
|
||||||
|
|
||||||
|
with open(f"{self.target}/etc/systemd/timesyncd.conf", "w") as fh:
|
||||||
|
fh.write("[Time]\n")
|
||||||
|
fh.write("NTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org\n")
|
||||||
|
fh.write("FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 0.fr.pool.ntp.org\n")
|
||||||
|
|
||||||
with Boot(self) as session:
|
with Boot(self) as session:
|
||||||
session.SysCommand(["timedatectl", "set-ntp", 'true'])
|
session.SysCommand(["timedatectl", "set-ntp", 'true'])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue