From 6e497c22ea3302994c0a81cf54e67834d8e13d83 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Mon, 16 May 2022 15:17:59 +0200 Subject: Moved the configuration in differents files --- board/network.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 board/network.sh (limited to 'board/network.sh') diff --git a/board/network.sh b/board/network.sh new file mode 100644 index 0000000..65a5640 --- /dev/null +++ b/board/network.sh @@ -0,0 +1,26 @@ +########################### +# # +# Network configuration # +# # +########################### + +# Add default wpa_supplicant.conf if it exists +if [ -f "$BR2_EXTERNAL_PIAUDIO_PATH/wpa_supplicant.conf" ]; then + create_missing_dir "/etc/wpa_supplicant/" + cat "$BR2_EXTERNAL_PIAUDIO_PATH/wpa_supplicant.conf" > "${TARGET_DIR}/etc/wpa_supplicant/wpa_supplicant-wlan0.conf" + + + cat << __EOF__ > "${TARGET_DIR}/etc/systemd/network/wireless.network" +[Match] +Name=wlan0 + +[Network] +DHCP=yes +__EOF__ + + # Create the link to interface wlan0 directly in the system configuration + ln -sf /usr/lib/systemd/system/wpa_supplicant@.service "${TARGET_DIR}/usr/lib/systemd/system/multi-user.target.wants/wpa_supplicant@wlan0.service" + +fi + + -- cgit v1.2.3