distro-agnostic.sh: fix: check if chroot (not host!) has timesyncd.conf as condition to enable systemd-timesyncd.service (#4870)

This commit is contained in:
Ricardo Pardini 2023-02-26 05:36:32 -03:00 committed by GitHub
parent b7921eb53e
commit d453c873fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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]