mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* usr/lib/byobu/network: LP: #880410
- localize some variables, fix variable colision with cpu_temp
This commit is contained in:
parent
ca50e3eccb
commit
cc974dbadd
2 changed files with 4 additions and 1 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -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 <kirkland@ubuntu.com> Mon, 31 Oct 2011 09:46:46 -0400
|
||||
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue