mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
ec2_cost, ip_address, network, rcs_cost: fix bug when calling ifconfig
without setting lang to english, LP: #578792
This commit is contained in:
parent
5b97f97e24
commit
77083c27cc
5 changed files with 8 additions and 5 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -2,6 +2,9 @@ byobu (2.75) UNRELEASED; urgency=low
|
|||
|
||||
* usr/bin/byobu: ensure that .screenrc gets sourced if byobu is run
|
||||
with arguments, LP: #580760
|
||||
* ec2_cost, ip_address, network, rcs_cost: fix bug when calling ifconfig
|
||||
without setting lang to english, LP: #578792
|
||||
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Sat, 15 May 2010 15:32:30 -0400
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ TX_RATE="0.15"
|
|||
# Auto detect network interface
|
||||
IF=`tail -n1 /proc/net/route | awk '{print $1}'`
|
||||
|
||||
ifconfig_out=`/sbin/ifconfig "$IF"`
|
||||
ifconfig_out=`LC_ALL=C /sbin/ifconfig "$IF"`
|
||||
|
||||
# Calculate bandwidth cost
|
||||
tx_gb=`echo "$ifconfig_out" | grep "TX bytes:" | sed "s/^.*TX bytes://" | awk '{ printf "%f", $1 / 1024 / 1024 / 1024 }'`
|
||||
|
|
|
@ -21,7 +21,7 @@ PKG="byobu"
|
|||
color 2>/dev/null || color() { true; }
|
||||
|
||||
if [ "$1" = "--detail" ]; then
|
||||
/sbin/ifconfig | grep "inet addr" | sed -e 's/^\s*//' -e 's/\s*$//'
|
||||
LC_ALL=C /sbin/ifconfig | grep "inet addr" | sed -e 's/^\s*//' -e 's/\s*$//'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -36,6 +36,6 @@ else
|
|||
interface=`tail -n1 /proc/net/route | awk '{print $1}'`
|
||||
fi
|
||||
|
||||
ipaddr=`/sbin/ifconfig "$interface" | grep "inet addr:" | sed -e "s/^.*inet addr://" -e "s/ .*$//"`
|
||||
ipaddr=`LC_ALL=C /sbin/ifconfig "$interface" | grep "inet addr:" | sed -e "s/^.*inet addr://" -e "s/ .*$//"`
|
||||
|
||||
printf "%s$(color bold2)%s$(color -)" "$space" "$ipaddr"
|
||||
|
|
|
@ -28,7 +28,7 @@ else
|
|||
fi
|
||||
|
||||
if [ "$1" = "--detail" ]; then
|
||||
/sbin/ifconfig "$interface" | sed 's/\s*$//'
|
||||
LC_ALL=C /sbin/ifconfig "$interface" | sed 's/\s*$//'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ TX_RATE="0.22"
|
|||
# Auto detect network interface
|
||||
IF=`tail -n1 /proc/net/route | awk '{print $1}'`
|
||||
|
||||
ifconfig_out=`/sbin/ifconfig "$IF"`
|
||||
ifconfig_out=`LC_ALL=C /sbin/ifconfig "$IF"`
|
||||
|
||||
# Calculate bandwidth cost
|
||||
tx_gb=`echo "$ifconfig_out" | grep "TX bytes:" | sed "s/^.*TX bytes://" | awk '{ printf "%f", $1 / 1024 / 1024 / 1024 }'`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue