bin/logo, bin/release: when looking at /etc/issue, grab the first

line that starts with a real letter rather than control character,
LP: #432751
This commit is contained in:
Dustin Kirkland 2010-01-11 21:50:53 -06:00
commit 0272ed25eb
3 changed files with 5 additions and 2 deletions

View file

@ -104,7 +104,7 @@ fi
if [ -r "/etc/issue" ]; then
# Otherwise, check /etc/issue
distro=`cat /etc/issue`
distro=`grep -m1 "^[A-Za-z]" /etc/issue`
print_logo "$distro" && exit 0 || true
fi

View file

@ -50,7 +50,7 @@ elif [ -r "/etc/palm-build-info" ]; then
DISTRO=$(grep "^PRODUCT_VERSION_STRING=Palm " /etc/palm-build-info | sed "s/^.*=Palm //")
elif [ -r "/etc/issue" ]; then
# Otherwise, grab part of /etc/issue, ideally the distro and version
DISTRO=$(head -n1 /etc/issue | sed "s/ [^0-9]* / /" | awk '{print $1 " " $2}')
DISTRO=$(grep -m1 "^[A-Za-z]" /etc/issue | sed "s/ [^0-9]* / /" | awk '{print $1 " " $2}')
else
DISTRO="Byobu"
fi

3
debian/changelog vendored
View file

@ -6,6 +6,9 @@ byobu (2.46) unreleased; urgency=low
* byobu-config, doc/help.txt: insert version number in byobu help menu,
LP: #502119
* bin/network: match interface a bit better for bridges, LP: #498722
* bin/logo, bin/release: when looking at /etc/issue, grab the first
line that starts with a real letter rather than control character,
LP: #432751
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 07 Jan 2010 21:53:14 -0600