From 365ac32f6f67bbc532858a4d5b2b2559ab31bb65 Mon Sep 17 00:00:00 2001 From: Christoph Galuschka Date: Dec 26 2013 20:30:38 +0000 Subject: modify t_DistCheck to support EL7 --- diff --git a/tests/0_lib/functions.sh b/tests/0_lib/functions.sh index 24847bd..87137a7 100755 --- a/tests/0_lib/functions.sh +++ b/tests/0_lib/functions.sh @@ -97,7 +97,7 @@ function t_GetPkgRel # Description: return the distro release (returns 5 or 6 now) function t_DistCheck { - rpm -q --queryformat '%{version}\n' centos-release + rpm -q $(rpm -qf /etc/redhat-release) --queryformat '%{version}\n'|cut -f 1 -d '.' } # Additionally set distro release to $centos_ver centos_ver=$(t_DistCheck)