##// END OF EJS Templates
Add files via upload...
Bobberty -
r748:9bc2dc32b38f
parent child
Show More
@@ -13,6 +13,9 sed -i "s/^RaspberryPI/${HOSTNAME}/" "${ETC_DIR}/hostname"
13 13 install_readonly files/network/hosts "${ETC_DIR}/hosts"
14 14 sed -i "s/RaspberryPI/${HOSTNAME}/" "${ETC_DIR}/hosts"
15 15
16 # Ensure /etc/systemd/network directory is available
17 mkdir -p "${ETC_DIR}/systemd/network"
18
16 19 # Setup hostname entry with static IP
17 20 if [ "$NET_ETH_ADDRESS" != "" ] ; then
18 21 NET_IP=$(echo "${NET_ETH_ADDRESS}" | cut -f 1 -d'/')
@@ -68,6 +71,7 fi
68 71
69 72
70 73 if [ "$ENABLE_WIRELESS" = true ] ; then
74 mkdir -p "${ETC_DIR}/wpa_supplicant"
71 75 if [ "$ENABLE_WIFI_DHCP" = true ] ; then
72 76 # Enable DHCP configuration for interface eth0
73 77 sed -i -e "s/DHCP=.*/DHCP=yes/" -e "/DHCP/q" "${ETC_DIR}/systemd/network/wlan0.network"
@@ -97,16 +101,15 if [ "$ENABLE_WIRELESS" = true ] ; then
97 101 if [ ! -z "$NET_WIFI_SSID" ] && [ ! -z "$NET_WIFI_PSK" ] ; then
98 102 chroot_exec printf "
99 103 ctrl_interface=/run/wpa_supplicant
100 ctrl_interface_group=wheel
101 104 update_config=1
102 105 eapol_version=1
103 106 ap_scan=1
104 107 fast_reauth=1
105 108
106 " > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
109 " > "${ETC_DIR}/wpa_supplicant/wpa_supplicant-wlan0.conf"
107 110
108 111 #Configure WPA_supplicant
109 chroot_exec wpa_passphrase "$NET_SSID" "$NET_WPAPSK" >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
112 chroot_exec wpa_passphrase "$NET_WIFI_SSID" "$NET_WIFI_PSK" >> "${ETC_DIR}/wpa_supplicant/wpa_supplicant-wlan0.conf"
110 113
111 114 chroot_exec systemctl enable wpa_supplicant.service
112 115 chroot_exec systemctl enable wpa_supplicant@wlan0.service
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant