diff --git a/core/server-tokens/runtest.sh b/core/server-tokens/runtest.sh index 55e2c7e..757a24d 100755 --- a/core/server-tokens/runtest.sh +++ b/core/server-tokens/runtest.sh @@ -33,22 +33,23 @@ PACKAGES="${PACKAGES:-httpd}" REQUIRES="${REQUIRES:-curl}" rlJournalStart - rlPhaseStartSetup "Setup #1" + rlPhaseStartSetup "Setup Full-Release" rlRun "rlImport httpd/http" 0 "Import httpd library" rlAssertRpm --all CONF="${httpCONFDIR}/conf/httpd.conf" + rlRun "rlFileBackup $CONF" VERSION=`rpm -q --qf '%{VERSION}' $httpHTTPD` RELEASE=`rpm -q --qf '%{RELEASE}' $httpHTTPD` - rlIsFedora && OS="Fedora" - rlIsCentOS && OS="CentOS" - rlIsRHEL && OS="Red Hat Enterprise Linux" - rlRun "rlFileBackup $CONF" + OS=$(source /etc/os-release; echo ${NAME}) + rlIsRHEL 7 && OS="Red Hat Enterprise Linux" + # Full-Release not present in Fedora if ! rlIsFedora; then grep ServerTokens $CONF || rlRun "echo 'ServerTokens Full-Release' >> $CONF" else rlRun "sed -i 's/^ServerTokens.*/ServerTokens Full-Release/' $CONF" fi + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" rlRun "pushd $TmpDir" rlRun "httpStart" 0 "Start httpd"