mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Remove machine-id (#4288)
This commit is contained in:
@@ -274,6 +274,15 @@ create_rootfs_cache() {
|
||||
rm $SDCARD/etc/resolv.conf
|
||||
echo "nameserver $NAMESERVER" >> $SDCARD/etc/resolv.conf
|
||||
|
||||
# Remove `machine-id` (https://www.freedesktop.org/software/systemd/man/machine-id.html)
|
||||
# Note: This will mark machine `firstboot`
|
||||
echo "uninitialized" > "${SDCARD}/etc/machine-id"
|
||||
rm "${SDCARD}/var/lib/dbus/machine-id"
|
||||
|
||||
# Mask `systemd-firstboot.service` which will prompt locale, timezone and root-password too early.
|
||||
# `armbian-first-run` will do the same thing later
|
||||
chroot $SDCARD /bin/bash -c "systemctl mask systemd-firstboot.service >/dev/null 2>&1"
|
||||
|
||||
# stage: make rootfs cache archive
|
||||
display_alert "Ending debootstrap process and preparing cache" "$RELEASE" "info"
|
||||
sync
|
||||
|
||||
@@ -526,6 +526,10 @@ FAMILY_TWEAKS
|
||||
# remove network manager defaults to handle eth by default
|
||||
rm -f "${SDCARD}"/usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf
|
||||
|
||||
# `systemd-networkd.service` will be enabled by `/lib/systemd/system-preset/90-systemd.preset` during first-run.
|
||||
# Mask it to avoid conflict
|
||||
chroot "${SDCARD}" /bin/bash -c "systemctl mask systemd-networkd.service" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
|
||||
|
||||
# most likely we don't need to wait for nm to get online
|
||||
chroot "${SDCARD}" /bin/bash -c "systemctl disable NetworkManager-wait-online.service" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
|
||||
|
||||
@@ -548,6 +552,9 @@ FAMILY_TWEAKS
|
||||
# enable services
|
||||
chroot "${SDCARD}" /bin/bash -c "systemctl enable systemd-networkd.service systemd-resolved.service" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
|
||||
|
||||
# Mask `NetworkManager.service` to avoid conflict
|
||||
chroot "${SDCARD}" /bin/bash -c "systemctl mask NetworkManager.service" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
|
||||
|
||||
if [ -e /etc/systemd/timesyncd.conf ]; then
|
||||
chroot "${SDCARD}" /bin/bash -c "systemctl enable systemd-timesyncd.service" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user