diff --git a/bin/network b/bin/network index baf9a95d..acfc3611 100755 --- a/bin/network +++ b/bin/network @@ -31,12 +31,12 @@ if [ "$1" = "--detail" ]; then exit 0 fi -unit="kB/s" t2=`date +%s` ifconfig=`/sbin/ifconfig "$interface" | grep "RX bytes" | sed "s/.*:\(.*\) (.*:\(.*\) (.*/\1\n\2/"` for i in up down; do cache="/var/run/screen/S-$USER/$PKG.network_$i" t1=`stat -c %Y "$cache"` 2>/dev/null || t1=0 + unit="kB/s" if [ $t2 -le $t1 ]; then rate=0 else