diff --git a/bin/logo b/bin/logo index 57b87a6b..3740a2e6 100755 --- a/bin/logo +++ b/bin/logo @@ -90,8 +90,10 @@ fi # This can be a very expensive operation, do it only # if all other methods fail -distro=`lsb_release -s -a 2>/dev/null` -print_logo "$distro" && exit 0 || true +if which lsb_release >/dev/null 2>&1; then + distro=`lsb_release -s -a 2>/dev/null` + print_logo "$distro" && exit 0 || true +fi # No idea! printf " ? " diff --git a/bin/release b/bin/release index 6570ddb1..ea637307 100755 --- a/bin/release +++ b/bin/release @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if which lsb_release >/dev/null; then +if which lsb_release >/dev/null 2>&1; then if [ "$1" = "--detail" ]; then lsb_release -a 2>/dev/null exit 0 @@ -39,8 +39,8 @@ elif [ -r "/etc/issue" ]; then cat /etc/issue exit 0 fi - # Otherwise, grab part of /etc/issue - printf "\005{=b }%s\005{-} " $(head -n1 /etc/issue | awk '{print $1}') + # Otherwise, grab part of /etc/issue, ideally the distro and version + printf "\005{=b }%s\005{-} " $(head -n1 /etc/issue | sed "s/ [^0-9]* / /" | awk '{print $1 " " $2}') else echo "Unknown" fi