mirror of https://github.com/OpenIPC/firmware.git
13 lines
378 B
Bash
Executable File
13 lines
378 B
Bash
Executable File
#!/bin/sh
|
|
device=$(fw_printenv -n wlandevice)
|
|
|
|
if [ "$1" = "start" ] && [ ! -z "$device" ]; then
|
|
if /etc/wireless "$device"; then
|
|
sed -i "s|^auto|#auto|g" /etc/network/interfaces.d/eth0
|
|
sed -i "s|^#auto|auto|g" /etc/network/interfaces.d/wlan0
|
|
else
|
|
sed -i "s|^#auto|auto|g" /etc/network/interfaces.d/eth0
|
|
sed -i "s|^auto|#auto|g" /etc/network/interfaces.d/wlan0
|
|
fi
|
|
fi
|