bstinson / centos / t_functional

Forked from centos/t_functional 4 years ago
Clone

Blame tests/p_centos-release/centos-release_os-release.sh

53a8b5
#!/bin/bash
53a8b5
# Author: Fabian Arrotin <arrfab@centos.org>
53a8b5
Pablo Greco 687a67
t_Log "Running $0 - /etc/os-release has correct ABRT string for CentOS $centos_ver"
53a8b5
Pablo Greco 687a67
if [ "$centos_ver" -ge 7 ];then
Brian Stinson a263c1
	if [[ $centos_stream == "no" ]]; then
Brian Stinson a263c1
	  for string in CENTOS_MANTISBT_PROJECT=\"CentOS-$centos_ver\" CENTOS_MANTISBT_PROJECT_VERSION=\"$centos_ver\" REDHAT_SUPPORT_PRODUCT=\"centos\" REDHAT_SUPPORT_PRODUCT_VERSION=\"$centos_ver\"
Brian Stinson a263c1
	  do 
Brian Stinson a263c1
	    grep -q $string /etc/os-release
Brian Stinson a263c1
	    if [ $? -ne "0" ];then
Brian Stinson a263c1
	      t_Log "missing string $string in os-release file !"
Brian Stinson a263c1
	      exit 1
Brian Stinson a263c1
	    fi
Brian Stinson a263c1
	  done  
Brian Stinson a263c1
	else
Brian Stinson a263c1
	  echo "Skipping for CentOS Stream" ; exit 0
Brian Stinson a263c1
	fi
53a8b5
else
53a8b5
  echo "Skipping for CentOS 5 and 6 ..." ; exit 0
Brian Stinson a263c1
	
53a8b5
fi
53a8b5
53a8b5
t_CheckExitStatus $?
53a8b5