summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/eth.sh2
-rwxr-xr-xscripts/wifi.sh3
2 files changed, 4 insertions, 1 deletions
diff --git a/scripts/eth.sh b/scripts/eth.sh
index 2fb8b30..f4c1388 100755
--- a/scripts/eth.sh
+++ b/scripts/eth.sh
@@ -6,7 +6,7 @@ if="${BLOCK_INSTANCE:-enp0s25}"
[[ ! -d /sys/class/net/${if} ]] && exit 0
# operstate: down, up
-[[ "$(cat /sys/class/net/$IF/operstate)" = 'down' ]] && exit 0
+[[ "$(cat /sys/class/net/$if/operstate)" = 'down' ]] && exit 0
# first ipv4 addr
IP_ADDR=$(ip address show $if | grep 'inet ' | sed 's/\s\+inet \([0-9.]\+\)\/.*/\1/')
diff --git a/scripts/wifi.sh b/scripts/wifi.sh
index 51262c6..8cd8f41 100755
--- a/scripts/wifi.sh
+++ b/scripts/wifi.sh
@@ -5,6 +5,9 @@
if="${BLOCK_INSTANCE:-wlp3s0}"
[[ ! -d /sys/class/net/${if} ]] && exit 0
+# operstate: down, up
+[[ "$(cat /sys/class/net/$if/operstate)" = 'down' ]] && exit 0
+
show_ap_mac=0
show_ap_quality=0
show_ap_name=0