Subject: [MTT users] Another whatami patch
From: Adrian Reber (adrian_at_[hidden])
Date: 2014-11-22 08:48:29


Running on MTT on CentOS 6.x gives me:

linux-unknown_linux_type_please_send_us_a_patch-x86_64

Following patch fixes it:

diff --git a/client/whatami/whatami b/client/whatami/whatami
index 7819490..bad088f 100755
--- a/client/whatami/whatami
+++ b/client/whatami/whatami
@@ -236,8 +236,9 @@ get_linux_type()
                 elif [ -n "`egrep 'SGI ProPack 3' /etc/issue`" ]; then
                         distro=rhel3
                 
- elif [ -n "`egrep 'CentOS release 4.[0-9]' /etc/issue`" ]; then
- distro=rhel4
+ elif [ -n "`egrep 'CentOS release [0-9].[0-9]' /etc/issue`" ]; then
+ distro_ver="`grep 'CentOS' /etc/issue | sed -e 's/.*release \([0-9]*\.[0-9]*\).*/\1/'`"
+ distro=rhel$distro_ver
 
                 elif [ -n "`egrep 'SuSE SLES 8' /etc/issue`" ]; then
                         distro=sles8

                Adrian