* usr/lib/byobu/network: LP: #880410

- localize some variables, fix variable colision with cpu_temp
This commit is contained in:
Dustin Kirkland 2011-11-08 18:40:21 -06:00
commit cc974dbadd
2 changed files with 4 additions and 1 deletions

2
debian/changelog vendored
View file

@ -24,6 +24,8 @@ byobu (4.46) unreleased; urgency=low
- add ulimit checks to byobu -v - add ulimit checks to byobu -v
* usr/lib/byobu/.constants: * usr/lib/byobu/.constants:
- don't use UTF8 C an F for now - 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 <kirkland@ubuntu.com> Mon, 31 Oct 2011 09:46:46 -0400 -- Dustin Kirkland <kirkland@ubuntu.com> Mon, 31 Oct 2011 09:46:46 -0400

View file

@ -26,7 +26,7 @@ __network_detail() {
__network() { __network() {
get_network_interface; local interface="$_RET" 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 status_freq network
t="$_RET" t="$_RET"
# By default, we won't bug the user with the display of network traffic # 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" cache="$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND/network.$i"
[ -r "$cache" ] && read x1 < "$cache" || tx1=0 [ -r "$cache" ] && read x1 < "$cache" || tx1=0
IFS="$OIFS:" 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 while read iface rbytes rpackets rerrs rdrop rfifo rframe rcompressed rmulticast tbytes tpackets terrs tdrop tfifo tcolls tcarrier tcompressed; do
if [ "$iface" = "${interface}" ]; then if [ "$iface" = "${interface}" ]; then
[ "$i" = "up" ] && x2=${tbytes} || x2=${rbytes} [ "$i" = "up" ] && x2=${tbytes} || x2=${rbytes}