Tuesday, March 13, 2007

ibapplet-kde.sh fix

The script to check the signal strength that comes with standard ibdriver 1.3.2 (iBurst Wireless Internet Modem Driver) sometimes doesn't work. Error about invalid arguments etc.

This is my modified version of ibapplet-kde.sh
added: level=`echo "scale=0; $level / 1" | bc -l`

============= myib.sh ===============
#!/bin/sh

ifname=${1:-ib0}
dcopref=`kdialog --title "ibApplet" --progressbar "iBurst Signal Strength" 100`
prev=""
while true ; do
if [ `dcop $dcopref wasCancelled` = "true" ] ; then
break
fi
curr=`cat /proc/net/wireless`
if [ "$curr" != "$prev" ] ; then
prev=$curr
level=`echo "$curr" | awk "/$ifname:/ {print \\$4}"`
level=`echo "scale=0; $level / 1" | bc -l`
dcop $dcopref setProgress $level
fi
sleep 1
done
dcop $dcopref close

============= end ===============

1 comment:

Unknown said...

Casino Review - Filmfile Europe
Casino Review 토토 승무패 넷마블 · Slots · 금융 거래 정보 제공 사실 통보서 Live 벳 인포 Dealer Games · Bonuses · Table 스포츠토토 직원 샤오미 Games · Live Dealer Games · Live Sports Betting. · In-Play Sports 배당 토토 Betting.