Subject: Re: [MTT users] Another whatami patch
From: Jeff Squyres (jsquyres) (jsquyres_at_[hidden])
Date: 2014-11-22 08:51:45


Good one. I committed it -- thanks!

https://github.com/open-mpi/mtt/commit/6234642e8579a89f9aa72a27b0ee49485f2ab357

On Nov 22, 2014, at 8:48 AM, Adrian Reber <adrian_at_[hidden]> wrote:

> 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
> _______________________________________________
> mtt-users mailing list
> mtt-users_at_[hidden]
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/mtt-users
> Searchable archives: http://www.open-mpi.org/community/lists/mtt-users/2014/11/index.php

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/