From 7ec5578ec394c0d3a125cfa4a542ebebbd40d281 Mon Sep 17 00:00:00 2001 From: Christoph Galuschka Date: Dec 26 2013 20:32:22 +0000 Subject: modify t_DistCheck to support EL7 (kudos to Arrfab) --- 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)