##// END OF EJS Templates
a
Unknown -
r699:f8c24f115d9a
parent child
Show More
@@ -164,7 +164,7 Set the IP address for the second NTP server.
164 164 ##### `NET_WIFI_SSID`=""
165 165 Set to your WIFI SSID
166 166
167 ##### `NET_WIFI_WPAPSK`=""
167 ##### `NET_WIFI_PSK`=""
168 168 Set your WPA/WPA2 PSK
169 169
170 170 ---
@@ -88,21 +88,23 else # ENABLE_ETH_DHCP=false
88 88 "${ETC_DIR}/systemd/network/wlan0.network"
89 89 fi
90 90
91 printf "
92 ctrl_interface=/run/wpa_supplicant
93 ctrl_interface_group=wheel
94 update_config=1
95 eapol_version=1
96 ap_scan=1
97 fast_reauth=1
98
99 " > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
100
101 #Configure WPA_supplicant
102 chroot_exec wpa_passphrase "$NET_SSID" "$NET_WPAPSK" >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
103
104 chroot_exec systemctl enable wpa_supplicant.service
105 chroot_exec systemctl enable wpa_supplicant@wlan0.service
91 if [ -z "$NET_WIFI_SSID" ] && [ -z "$NET_WIFI_PSK" ] ; then
92 printf "
93 ctrl_interface=/run/wpa_supplicant
94 ctrl_interface_group=wheel
95 update_config=1
96 eapol_version=1
97 ap_scan=1
98 fast_reauth=1
99
100 " > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
101
102 #Configure WPA_supplicant
103 chroot_exec wpa_passphrase "$NET_SSID" "$NET_WPAPSK" >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
104
105 chroot_exec systemctl enable wpa_supplicant.service
106 chroot_exec systemctl enable wpa_supplicant@wlan0.service
107 fi
106 108
107 109 # Remove empty settings from network configuration
108 110 sed -i "/.*=\$/d" "${ETC_DIR}/systemd/network/eth0.network"
@@ -25,4 +25,8 if [ ! -z INTERFACE_NAME_WIFI ] ; then
25 25 fi
26 26 # Move config to new interface name
27 27 mv /etc/systemd/network/wlan0.network /etc/systemd/network/"${INTERFACE_NAME_WIFI}".network
28
29 systemctl disable wpa_supplicant@wlan0.service
30 systemctl enable wpa_supplicant@"${INTERFACE_NAME_WIFI}".service
31 systemctl start wpa_supplicant@"${INTERFACE_NAME_WIFI}".service
28 32 fi
@@ -125,8 +125,8 NET_ETH_DNS_DOMAINS=${NET_ETH_DNS_DOMAINS:=""}
125 125 NET_ETH_NTP_1=${NET_ETH_NTP_1:=""}
126 126 NET_ETH_NTP_2=${NET_ETH_NTP_2:=""}
127 127
128 NET_WIFI_SSID=${NET_SSID:=""}
129 NET_WIFI_WPAPSK=${NET_WPAPSK:=""}
128 NET_WIFI_SSID=${NET_WIFI_SSID:=""}
129 NET_WIFI_PSK=${NET_WIFI_PSK:=""}
130 130
131 131 # Network settings (static)
132 132 NET_WIFI_ADDRESS=${NET_WIFI_ADDRESS:=""}
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant