From df052c5b4b9dbc057ae903f0bcdc93896628dc6e Mon Sep 17 00:00:00 2001 From: Athmane Madjoudj Date: Apr 18 2012 22:19:52 +0000 Subject: Readd initscripts tests --- diff --git a/tests/p_initscripts/initscripts_centos_brand_rcsysinit.sh b/tests/p_initscripts/initscripts_centos_brand_rcsysinit.sh new file mode 100755 index 0000000..090a7b1 --- /dev/null +++ b/tests/p_initscripts/initscripts_centos_brand_rcsysinit.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# Author: Athmane Madjoudj + +t_Log "Running $0 - initscripts CentOS branding " + +if (t_GetPkgRel basesystem | grep -q el6) +then + t_Log "Test not required for CentOS 6.x" + exit 0 +else + grep "CentOS" /etc/rc.sysinit > /dev/null 2>&1 +fi + +t_CheckExitStatus $? diff --git a/tests/p_initscripts/initscripts_service_status.sh b/tests/p_initscripts/initscripts_service_status.sh new file mode 100755 index 0000000..2c7c382 --- /dev/null +++ b/tests/p_initscripts/initscripts_service_status.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Author: Athmane Madjoudj + +t_Log "Running $0 - check if service cmd can get service status" + +# auditd is used as example because it's standard with minimal install +service auditd status | grep -q 'is running' + +t_CheckExitStatus $? +