Update rc.wireless

This commit is contained in:
bergware
2025-05-08 16:17:23 +02:00
parent d8c5b24d6a
commit ea2ba286b0

View File

@@ -257,8 +257,7 @@ wifi_stop(){
log "$DAEMON... No Wifi present."
return
fi
IPV4=$(ip -4 -br addr show scope global primary dev $PORT | awk '{print $3;exit}')
INDEX=$((3000 - 1 + $(index $PORT)))
IPV4=$(ip -4 -br addr show scope global primary dev $PORT | awk '{print $3,$4,$5;exit}')
DHCP=$DHCP4
DNS=$DNS4
SRV4=$DNS
@@ -270,7 +269,7 @@ wifi_stop(){
SRV6=$DNS
ipaddr_down 6
fi
run ip addr del $IPV4 metric $INDEX dev $PORT
run ip addr del $IPV4 dev $PORT
run pkill wpa_supplicant
run iw dev $PORT disconnect
run rm -f $INI