From 53a8b573724301d79de8c9a31d8875a48f283340 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Mar 12 2015 10:08:12 +0000 Subject: Adding an extra check for needed ABRT strings in os-release file (for new CentOS 7 release) --- diff --git a/tests/p_centos-release/centos-release_os-release.sh b/tests/p_centos-release/centos-release_os-release.sh new file mode 100755 index 0000000..9cfb673 --- /dev/null +++ b/tests/p_centos-release/centos-release_os-release.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Author: Fabian Arrotin + +t_Log "Running $0 - /etc/os-release has correct ABRT string for CentOS 7" + +if [ "$centos_ver" = "7" ];then + for string in CENTOS_MANTISBT_PROJECT=\"CentOS-7\" CENTOS_MANTISBT_PROJECT_VERSION=\"7\" REDHAT_SUPPORT_PRODUCT=\"centos\" REDHAT_SUPPORT_PRODUCT_VERSION=\"7\" + do + grep -q $string /etc/os-release + if [ $? -ne "0" ];then + t_Log "missing string $string in os-release file !" + exit 1 + fi + done +else + echo "Skipping for CentOS 5 and 6 ..." ; exit 0 +fi + +t_CheckExitStatus $? +