From 99be958c4fba30f40d2135f591b5d4a47e055478 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 25 Mar 2022 08:53:30 +0100 Subject: [PATCH] Drop NetworkManager default config (#1813) * Drop default NetworkManager configuration NetworkManager will automatically connect using the global defaults. Also Supervisor today will create a profiles once the user configures the network explicitly. * Create system-connection directory --- .../etc/NetworkManager/system-connections/default | 13 ------------- .../rootfs-overlay/usr/libexec/hassos-overlay | 6 +----- buildroot-external/scripts/rootfs-layer.sh | 3 --- 3 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 buildroot-external/rootfs-overlay/etc/NetworkManager/system-connections/default diff --git a/buildroot-external/rootfs-overlay/etc/NetworkManager/system-connections/default b/buildroot-external/rootfs-overlay/etc/NetworkManager/system-connections/default deleted file mode 100644 index 8c24b50b1..000000000 --- a/buildroot-external/rootfs-overlay/etc/NetworkManager/system-connections/default +++ /dev/null @@ -1,13 +0,0 @@ -[connection] -id=Home Assistant OS default -uuid=f62bf7c2-e565-49ff-bbfc-a4cf791e6add -type=802-3-ethernet -llmnr=2 -mdns=2 - -[ipv4] -method=auto - -[ipv6] -addr-gen-mode=stable-privacy -method=auto diff --git a/buildroot-external/rootfs-overlay/usr/libexec/hassos-overlay b/buildroot-external/rootfs-overlay/usr/libexec/hassos-overlay index b8d6af7c8..a6b4bcff1 100755 --- a/buildroot-external/rootfs-overlay/usr/libexec/hassos-overlay +++ b/buildroot-external/rootfs-overlay/usr/libexec/hassos-overlay @@ -3,11 +3,7 @@ mkdir -p /mnt/overlay/etc/ # Network -if [ ! -d /mnt/overlay/etc/NetworkManager/system-connections ]; then - mkdir -p /mnt/overlay/etc/NetworkManager/system-connections - cp -fp /etc/NetworkManager/system-connections/* /mnt/overlay/etc/NetworkManager/system-connections/ - chmod 600 /mnt/overlay/etc/NetworkManager/system-connections/* -fi +mkdir -p /mnt/overlay/etc/NetworkManager/system-connections if [ ! -f /mnt/overlay/etc/hostname ]; then cp -fp /etc/hostname /mnt/overlay/etc/hostname diff --git a/buildroot-external/scripts/rootfs-layer.sh b/buildroot-external/scripts/rootfs-layer.sh index 8f913acc2..3f91a7103 100755 --- a/buildroot-external/scripts/rootfs-layer.sh +++ b/buildroot-external/scripts/rootfs-layer.sh @@ -19,9 +19,6 @@ function fix_rootfs() { # systemd-update-done.service relies on writeable /var and /etc rm -f "${TARGET_DIR}/usr/lib/systemd/system/sysinit.target.wants/systemd-update-done.service" - # Fix: permission for system connection files - chmod 600 "${TARGET_DIR}/etc/NetworkManager/system-connections"/* - # Fix: tempfs with /srv sed -i "/srv/d" "${TARGET_DIR}/usr/lib/tmpfiles.d/home.conf"