diff options
Diffstat (limited to 'board/common/network.sh')
| -rw-r--r-- | board/common/network.sh | 36 |
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__ |
