From d453c873fd34bf1690d0bade1ef4c75987376073 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sun, 26 Feb 2023 05:36:32 -0300 Subject: [PATCH] distro-agnostic.sh: fix: check if chroot (not host!) has `timesyncd.conf` as condition to enable `systemd-timesyncd.service` (#4870) --- lib/functions/rootfs/distro-agnostic.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/functions/rootfs/distro-agnostic.sh b/lib/functions/rootfs/distro-agnostic.sh index a085944ab2..3ff5f9cad8 100644 --- a/lib/functions/rootfs/distro-agnostic.sh +++ b/lib/functions/rootfs/distro-agnostic.sh @@ -570,9 +570,10 @@ function install_distribution_agnostic() { # Mask `NetworkManager.service` to avoid conflict chroot_sdcard systemctl mask NetworkManager.service - if [ -e /etc/systemd/timesyncd.conf ]; then + if [ -e "${SDCARD}"/etc/systemd/timesyncd.conf ]; then chroot_sdcard systemctl enable systemd-timesyncd.service fi + umask 022 cat > "${SDCARD}"/etc/systemd/network/eth0.network <<- __EOF__ [Match]