Fix for when modem is hotplugged
This commit is contained in:
parent
f226f0b14e
commit
2daba173f0
|
@ -1 +1,3 @@
|
|||
nmcli -t -f active,ssid dev wifi | grep -E 'yes' | cut -c 5- | grep . || (mmcli -m /org/freedesktop/ModemManager1/Modem/0 | grep "operator name:" | cut -c 38- | tr -d '\n' && echo -n ": " && mmcli -m /org/freedesktop/ModemManager1/Modem/0 | grep -P "\d+%" -o) || echo "Disconnected"
|
||||
modem=$(mmcli -L | grep -P "/org/freedesktop/.+\d" -m 1 -o)
|
||||
|
||||
nmcli -t -f active,ssid dev wifi | grep -E 'yes' | cut -c 5- | grep . || (mmcli -m $modem | grep "operator name:" | cut -c 38- | tr -d '\n' && mmcli -m $modem | grep -P " \d+%" -o) || echo "Disconnected"
|
||||
|
|
Loading…
Reference in New Issue