From 0528e075ebf615ea9c2e34d5482a126c10230d3c Mon Sep 17 00:00:00 2001 From: Ruledo Date: Thu, 16 Jan 2025 02:11:33 -0800 Subject: [PATCH] wifi mesh control checks for wlan0 existence If wlan0 does not exist, do nothing, --- .../rootfs_uclibc_rv1106/usr/local/bin/wifi-mesh-control.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/wifi-mesh-control.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/wifi-mesh-control.sh index 0ff79a6..9192e03 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/wifi-mesh-control.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/wifi-mesh-control.sh @@ -67,8 +67,8 @@ monitor_changes() { while true; do PID=$(ps -C meshtasticd -o pid= | tr -d ' ') - if [[ -n "$PID" ]] && sudo lsof /dev/spidev0.0 | grep -q "$PID"; then - #if sudo lsof /dev/spidev0.0 | grep -q "meshtasticd"; then + #if [[ -n "$PID" ]] && sudo lsof /dev/spidev0.0 | grep -q "$PID"; then + if [[ -n "$PID" ]] && sudo lsof /dev/spidev0.0 | grep -q "$PID" && [[ -d /sys/class/net/wlan0 ]]; then local current_mobile_state current_wlan_state current_mobile_state=$(get_mobile_wifi_state) current_wlan_state=$(cat /sys/class/net/wlan0/operstate)