From ed11bcff2d293879b7031ed0be2d49be029d3b6b Mon Sep 17 00:00:00 2001 From: metamuffin Date: Wed, 13 Nov 2024 01:07:39 +0100 Subject: [PATCH] Fix wifi --- airootfs/etc/systemd/network/20-rename-wlan.link | 5 +++++ airootfs/etc/systemd/system/configure_wpa.service | 2 +- .../network-online.target.wants/wpa_supplicant.service | 1 - .../network-online.target.wants/wpa_supplicant@wfi0.service | 1 + .../override.conf | 0 airootfs/usr/local/bin/configure_wpa | 2 +- profiledef.sh | 2 +- 7 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 airootfs/etc/systemd/network/20-rename-wlan.link delete mode 120000 airootfs/etc/systemd/system/network-online.target.wants/wpa_supplicant.service create mode 120000 airootfs/etc/systemd/system/network-online.target.wants/wpa_supplicant@wfi0.service rename airootfs/etc/systemd/system/{wpa_supplicant.service.d => wpa_supplicant@.service.d}/override.conf (100%) diff --git a/airootfs/etc/systemd/network/20-rename-wlan.link b/airootfs/etc/systemd/network/20-rename-wlan.link new file mode 100644 index 0000000..6bd92cf --- /dev/null +++ b/airootfs/etc/systemd/network/20-rename-wlan.link @@ -0,0 +1,5 @@ +[Match] +Type=wlan + +[Link] +Name=wfi0 diff --git a/airootfs/etc/systemd/system/configure_wpa.service b/airootfs/etc/systemd/system/configure_wpa.service index 075aa52..c431286 100644 --- a/airootfs/etc/systemd/system/configure_wpa.service +++ b/airootfs/etc/systemd/system/configure_wpa.service @@ -1,6 +1,6 @@ [Unit] Description=Generate wpa_supplicant config from EFI variables -Before=wpa_supplicant.service +Before=wpa_supplicant@.service ConditionPathExists=/sys/firmware/efi/efivars/WlanSSID-97b6e7a4-b8a6-4d85-b7c4-0030bb5f2d38 [Service] diff --git a/airootfs/etc/systemd/system/network-online.target.wants/wpa_supplicant.service b/airootfs/etc/systemd/system/network-online.target.wants/wpa_supplicant.service deleted file mode 120000 index 1aff68e..0000000 --- a/airootfs/etc/systemd/system/network-online.target.wants/wpa_supplicant.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/wpa_supplicant.service \ No newline at end of file diff --git a/airootfs/etc/systemd/system/network-online.target.wants/wpa_supplicant@wfi0.service b/airootfs/etc/systemd/system/network-online.target.wants/wpa_supplicant@wfi0.service new file mode 120000 index 0000000..8bfa905 --- /dev/null +++ b/airootfs/etc/systemd/system/network-online.target.wants/wpa_supplicant@wfi0.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/wpa_supplicant@.service \ No newline at end of file diff --git a/airootfs/etc/systemd/system/wpa_supplicant.service.d/override.conf b/airootfs/etc/systemd/system/wpa_supplicant@.service.d/override.conf similarity index 100% rename from airootfs/etc/systemd/system/wpa_supplicant.service.d/override.conf rename to airootfs/etc/systemd/system/wpa_supplicant@.service.d/override.conf diff --git a/airootfs/usr/local/bin/configure_wpa b/airootfs/usr/local/bin/configure_wpa index 204bbc6..149da96 100644 --- a/airootfs/usr/local/bin/configure_wpa +++ b/airootfs/usr/local/bin/configure_wpa @@ -2,4 +2,4 @@ set ssid (cat /sys/firmware/efi/efivars/WlanSSID-97b6e7a4-b8a6-4d85-b7c4-0030bb5f2d38 | tail -c +5) set psk (cat /sys/firmware/efi/efivars/WlanPSK-97b6e7a4-b8a6-4d85-b7c4-0030bb5f2d38 | tail -c +5) -wpa_passphrase $ssid $psk > /etc/wpa_supplicant/wpa_supplicant.conf +wpa_passphrase $ssid $psk > /etc/wpa_supplicant/wpa_supplicant-wfi0.conf diff --git a/profiledef.sh b/profiledef.sh index 09543cc..4ff7a3a 100644 --- a/profiledef.sh +++ b/profiledef.sh @@ -12,7 +12,7 @@ bootmodes=('uefi-ia32.systemd-boot.esp' 'uefi-x64.systemd-boot.esp') arch="x86_64" pacman_conf="pacman.conf" airootfs_image_type="squashfs" -airootfs_image_tool_options=('-comp' 'zstd' '-Xcompression-level' '10') +airootfs_image_tool_options=('-comp' 'zstd' '-Xcompression-level' '5') bootstrap_tarball_compression=(zstd -c -T0 --long -19) file_permissions=( ["/etc/shadow"]="0:0:400"