From 50a28abde9688ace482f7de74c98dd292decde5b Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 13 May 2009 23:09:23 -0500 Subject: [PATCH] * bin/ip-address: hostname -i doesn't always work, use ifconfig instead, LP: #376080 Signed-off-by: Dustin Kirkland --- bin/ip-address | 5 ++++- debian/changelog | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bin/ip-address b/bin/ip-address index 8e5452e0..eb5f334a 100755 --- a/bin/ip-address +++ b/bin/ip-address @@ -28,4 +28,7 @@ space= grep -qs "^hostname=1$" "$HOME/.$PKG/status" && space=" " grep -qs "^whoami=1$" "$HOME/.$PKG/status" && space=" " -printf "%s\005{+b }%s\005{-}" "$space" $(hostname -i 2>/dev/null) +interface=`/sbin/route -n | tail -n 1 | sed "s/^.* //"` +ipaddr=`/sbin/ifconfig "$interface" | grep "inet addr:" | sed "s/^.*inet addr://" | sed "s/ .*$//"` + +printf "%s\005{+b }%s\005{-}" "$space" "$ipaddr" diff --git a/debian/changelog b/debian/changelog index e7b2f0c2..2cfefbae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,12 +8,16 @@ byobu (2.4) unreleased; urgency=low * bin/release: try to grab both distro and version from /etc/issue if that's what we're forced to use * bin/updates-available: improve counting of yum updates available + * bin/ip-address,whoami,release,hostname: use +b rather than =b, + colors look bad on the light* profiles + * bin/ip-address: hostname -i doesn't always work, use ifconfig + instead, LP: #376080 * debian/control: suggest vim, for better handling of status details [ David Duffey ] * rpm/byobu.spec: initial specfile for RH packaging - -- Dustin Kirkland Mon, 11 May 2009 22:43:51 -0500 + -- Dustin Kirkland Wed, 13 May 2009 23:08:39 -0500 byobu (2.3-0ubuntu1) karmic; urgency=low