Blame tests/p_systemd/10-systemctl_list_services.sh

Rene Diepstraten 8c0afd
#!/bin/bash
Rene Diepstraten 8c0afd
# Author: Athmane Madjoudj <athmanem@gmail.com>
Rene Diepstraten 8c0afd
#         Rene Diepstraten <rene@renediepstraten.nl>
Rene Diepstraten 8c0afd
Rene Diepstraten 8c0afd
t_Log "Running $0 - Checking if systemctl can check if a service is enabled"
40b4c8
40b4c8
if [ "$CONTAINERTEST" -eq "1" ]; then
40b4c8
    t_Log "Running in container -> SKIP"
40b4c8
    exit 0
40b4c8
fi
40b4c8
Rene Diepstraten 8c0afd
[ ${centos_ver} -lt 7 ] && { t_Log "Systemd is part of el since el7, skipping systemd tests..." ; exit ; }
Rene Diepstraten 8c0afd
Rene Diepstraten 8c0afd
# auditd is used as example because it's standard with minimal install
Rene Diepstraten 8c0afd
Rene Diepstraten 8c0afd
systemctl is-enabled auditd.service > /dev/null
Rene Diepstraten 8c0afd
Rene Diepstraten 8c0afd
t_CheckExitStatus $?