From cc974dbaddc8c43af3f21b6f433c037a8f8da0ba Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Tue, 8 Nov 2011 18:40:21 -0600 Subject: [PATCH] * usr/lib/byobu/network: LP: #880410 - localize some variables, fix variable colision with cpu_temp --- debian/changelog | 2 ++ usr/lib/byobu/network | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 220bac7f..8c9307e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,8 @@ byobu (4.46) unreleased; urgency=low - add ulimit checks to byobu -v * usr/lib/byobu/.constants: - don't use UTF8 C an F for now + * usr/lib/byobu/network: LP: #880410 + - localize some variables, fix variable colision with cpu_temp -- Dustin Kirkland Mon, 31 Oct 2011 09:46:46 -0400 diff --git a/usr/lib/byobu/network b/usr/lib/byobu/network index c324bd8f..2d7c63fb 100755 --- a/usr/lib/byobu/network +++ b/usr/lib/byobu/network @@ -26,7 +26,7 @@ __network_detail() { __network() { get_network_interface; local interface="$_RET" - local x1=0 x2=0 + local x1=0 x2=0 tx1=0 i= t= unit= symbol= cache= rate= status_freq network t="$_RET" # By default, we won't bug the user with the display of network traffic @@ -42,6 +42,7 @@ __network() { cache="$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND/network.$i" [ -r "$cache" ] && read x1 < "$cache" || tx1=0 IFS="$OIFS:" + local iface rbytes rpackets rerrs rdrop rfifo rframe rcompressed rmulticast tbytes tpackets terrs tdrop tfifo tcolls tcarrier tcompressed while read iface rbytes rpackets rerrs rdrop rfifo rframe rcompressed rmulticast tbytes tpackets terrs tdrop tfifo tcolls tcarrier tcompressed; do if [ "$iface" = "${interface}" ]; then [ "$i" = "up" ] && x2=${tbytes} || x2=${rbytes}