[ewg] [PATCH] ofed_scripts/openibd: Don't check for gcc version unless it is installed
Vladimir Sokolovsky
vlad at dev.mellanox.co.il
Tue Sep 29 09:11:10 PDT 2009
Moni Shoua wrote:
> If gcc is not installed then don't check for gcc version. This prevents error
> messages to be printed on the screen.
>
> Signed-off-by: Moni Shoua <monis at voltaire.com>
> ---
> openibd | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ofed_scripts/openibd b/ofed_scripts/openibd
> index 1b88163..8b0c3e6 100755
> --- a/ofed_scripts/openibd
> +++ b/ofed_scripts/openibd
> @@ -410,7 +410,7 @@ get_debug_info()
> test -e /etc/issue && echo "OS: `cat /etc/issue`" >> $DEBUG_INFO
> echo "Current kernel: `uname -r`" >> $DEBUG_INFO
> echo "Architecture: `uname -m`" >> $DEBUG_INFO
> - echo "GCC version: `gcc --version`" >> $DEBUG_INFO
> + which gcc &>/dev/null && echo "GCC version: `gcc --version`" >> $DEBUG_INFO
> echo "CPU: `cat /proc/cpuinfo | /bin/grep -E \"model name|arch\" | head -1`" >> $DEBUG_INFO
> echo "`cat /proc/meminfo | /bin/grep \"MemTotal\"`" >> $DEBUG_INFO
> echo "Chipset: `/sbin/lspci 2> /dev/null | head -1 | cut -d ':' -f 2-`" >> $DEBUG_INFO
>
>
Applied,
Thanks,
Vladimir
More information about the ewg
mailing list