/usr/share/checkbox/scripts/network_wireless_test is in checkbox 0.13.7.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #! /bin/sh
#assume that the test fail at the beginning
found=0
iw_inter=`iwconfig 2>/dev/null | grep "^[^ ]" | awk '{print $1}'`
if [ -z "$iw_inter" ]; then
echo "No wireless device found"
exit 0
fi
for dev in $iw_inter ; do
iw_net=`iwlist $dev scan 2>/dev/null | grep "ESSID:"`
if [ ! -z "$iw_net" ] ; then
echo "Wireless network found on "$dev
cat << EOF
$iw_net
EOF
found=`expr $found + 1`
else
echo "No wireless network found on "$dev
fi
done
if [ $found -eq 0 ]; then
exit 1
fi
|