File tree Expand file tree Collapse file tree
gluon-linkcheck/files/lib/gluon/linkcheck Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,17 +80,23 @@ for link in $links; do
8080 linksexist=" $linksexist $link "
8181 fi
8282done
83+ rm /tmp/linkcheck.iwscan.* 2> /dev/null
8384
8485for linkexist in $linksexist ; do
8586 linkname=$( uci get $linkexist .ifname)
86- bsses=$( iw dev $linkname scan lowpri passive| grep $linkname | wc -l)
87- sleep 8
87+ iwfile=/tmp/linkcheck.iwscan.$( uci get $linkexist .device)
88+ if [ ! -f $iwfile ] ; then
89+ sleep 4
90+ iw dev $linkname scan lowpri passive > $iwfile
91+ sleep 4
92+ fi
93+ bsses=$( cat $iwfile | grep " BSS .*:.*:.*:.*:.*:.*(on.*)" | wc -l)
94+ unset bssid
8895 bssid=$( uci get $linkexist .mesh_id 2> /dev/null)
8996 if [ -z " $bssid " ] ; then
9097 bssid=$( uci get $linkexist .ssid)
9198 fi
92- neighbours=$( iw dev $linkname scan lowpri passive| grep $bssid | wc -l)
93- sleep 2
99+ neighbours=$( cat $iwfile | grep $bssid | wc -l)
94100 checks=" neighbours bsses"
95101 for check in $checks ; do
96102 wert=$( eval echo \$ $check )
You can’t perform that action at this time.
0 commit comments