aboutsummaryrefslogtreecommitdiff
path: root/board/network.sh
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2022-05-16 15:17:59 +0200
committerSébastien Dailly <sebastien@dailly.me>2022-05-16 15:17:59 +0200
commit6e497c22ea3302994c0a81cf54e67834d8e13d83 (patch)
tree1971215344868318e218c81468a0cff17969d8dc /board/network.sh
parentcbb58e2287efb5c9c5d6e6eafbe70f329ff16098 (diff)
Moved the configuration in differents files
Diffstat (limited to 'board/network.sh')
-rw-r--r--board/network.sh26
1 files changed, 26 insertions, 0 deletions
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
+
+