summaryrefslogtreecommitdiff
path: root/board/common/network.sh
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-05-30 09:58:45 +0200
committerSébastien Dailly <sebastien@dailly.me>2026-05-30 09:58:45 +0200
commit8b2420f74367e4973be0dd9556c021588abfe591 (patch)
treeb95fbf8d5aefc51f619b2506d8ae75ee9f29b75b /board/common/network.sh
Initial commit
Diffstat (limited to 'board/common/network.sh')
-rw-r--r--board/common/network.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/board/common/network.sh b/board/common/network.sh
new file mode 100644
index 0000000..d28997e
--- /dev/null
+++ b/board/common/network.sh
@@ -0,0 +1,36 @@
+###########################
+# #
+# Network configuration #
+# #
+###########################
+
+# Add default wpa_supplicant.conf if it exists
+if [ -f "$BR2_EXTERNAL_BASTION_PATH/wpa_supplicant.conf" ]; then
+ create_missing_dir "/etc/wpa_supplicant/"
+ cat "$BR2_EXTERNAL_BASTION_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
+
+
+cat << __EOF__ > "${TARGET_DIR}/etc/systemd/network/dhcp.network"
+[Match]
+Name=*
+
+[Network]
+DHCP=yes
+
+[DHCP]
+UseDNS=true
+__EOF__