[no ci] Overlay: add separate check for usb modem devices

pull/1249/head
Viktor 2024-01-11 18:26:06 +01:00
parent d25af4728a
commit 662985cc91
1 changed files with 6 additions and 4 deletions

View File

@ -4,12 +4,13 @@ mac=$(fw_printenv -n wlanmac)
set_wireless() {
path=/etc/wireless
if $path/usb "$dev" || $path/modem "$dev" || $path/sdio "$dev"; then
if $path/usb "$dev" || $path/sdio "$dev"; then
[ -n "$mac" ] && ip link set dev wlan0 address "$mac"
ifup usb0
ifup wlan0
ifconfig eth0 192.168.192.10
elif $path/modem "$dev"; then
ifup usb0
fi
ifconfig eth0 192.168.192.10
}
case "$1" in
@ -27,7 +28,8 @@ case "$1" in
echo "Stopping network..."
ifdown lo
if [ -n "$dev" ]; then
ifdown wlan0
ifdown -f wlan0
ifdown -f usb0
else
ifdown eth0
fi