From b67257233f43fa8d34dacd6ecc3dc7cbbf60d221 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sat, 20 Mar 2021 17:26:48 +0100 Subject: Fixed #64. installation.set_timezone() already excisted since earlier versions of archinstall in the library section. The guided.py example simply never asked for a time-zone. There's still no NTP option, which I'll add in later. Mostly because there's a lot of settings one can do to a time-client configuration, and I'm not sure all users want the default time servers etc. --- archinstall/lib/installer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'archinstall/lib/installer.py') diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 39e3447d..2604e77d 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -1,4 +1,4 @@ -import os, stat, time, shutil +import os, stat, time, shutil, pathlib from .exceptions import * from .disk import * @@ -171,7 +171,8 @@ class Installer(): def set_timezone(self, zone, *args, **kwargs): if not len(zone): return True - o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.mountpoint} ln -s /usr/share/zoneinfo/{zone} /etc/localtime')) + (pathlib.Path(self.mountpoint)/"etc"/"localtime").unlink(missing_ok=True) + sys_command(f'/usr/bin/arch-chroot {self.mountpoint} ln -s /usr/share/zoneinfo/{zone} /etc/localtime') return True def activate_ntp(self): -- cgit v1.2.3-70-g09d2