mirror of https://github.com/OpenIPC/firmware.git
				
				
				
			Overlay: move manual wlan mac setting to init script (#986)
							parent
							
								
									1a97f51f8b
								
							
						
					
					
						commit
						48b3c4b8c3
					
				|  | @ -1,5 +1,6 @@ | |||
| #!/bin/sh | ||||
| dev=$(fw_printenv -n wlandev) | ||||
| mac=$(fw_printenv -n wlanaddr) | ||||
| wlan=/etc/wireless | ||||
| netif=/etc/network/interfaces.d | ||||
| 
 | ||||
|  | @ -8,3 +9,7 @@ if [ "$1" = "start" ] && [ ! -z "$dev" ]; then | |||
| 		grep -q "static" $netif/eth0 || cp -f $wlan/interfaces/* $netif | ||||
| 	fi | ||||
| fi | ||||
| 
 | ||||
| if [ "$1" = "start" ] && [ ! -z "$mac" ]; then | ||||
| 	ip link set dev wlan0 address "$mac" | ||||
| fi | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| iface wlan0 inet dhcp | ||||
|     pre-up wlan_addr=$(fw_printenv -n wlanaddr) && ip link set dev wlan0 address $wlan_addr | ||||
|     post-up wpa_passphrase "$(fw_printenv -n wlanssid || echo OpenIPC)" "$(fw_printenv -n wlanpass || echo OpenIPC12345)" > /tmp/wpa_supplicant.conf | ||||
|     post-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf | ||||
|     post-up wpa_supplicant -B -i wlan0 -D nl80211,wext -c /tmp/wpa_supplicant.conf | ||||
|  |  | |||
|  | @ -1,6 +1,5 @@ | |||
| auto wlan0 | ||||
| iface wlan0 inet dhcp | ||||
|     pre-up wlan_addr=$(fw_printenv -n wlanaddr) && ip link set dev wlan0 address $wlan_addr | ||||
|     post-up wpa_passphrase "$(fw_printenv -n wlanssid || echo OpenIPC)" "$(fw_printenv -n wlanpass || echo OpenIPC12345)" > /tmp/wpa_supplicant.conf | ||||
|     post-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf | ||||
|     post-up wpa_supplicant -B -i wlan0 -D nl80211,wext -c /tmp/wpa_supplicant.conf | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue