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
|
- 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
|
||||||
|
|
||||||
|
|
|
@ -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}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue