From 38572e7eead76015b388723038f03e2ef0b1e3c1 Mon Sep 17 00:00:00 2001 From: Steve Grubb Date: Fri, 25 Aug 2023 10:41:20 -0400 Subject: [PATCH] Rewrite legacy service functions in terms of systemctl --- ChangeLog | 1 + init.d/Makefile.am | 3 +-- init.d/audit-functions | 52 --------------------------------------- init.d/auditd.condrestart | 7 +++--- init.d/auditd.reload | 6 +---- init.d/auditd.resume | 6 +---- init.d/auditd.rotate | 6 +---- init.d/auditd.state | 4 +-- init.d/auditd.stop | 3 +-- 9 files changed, 11 insertions(+), 77 deletions(-) delete mode 100644 init.d/audit-functions --- init.d/auditd.condrestart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.d/auditd.condrestart b/init.d/auditd.condrestart index d86e5e4..da5b359 100644 --- a/init.d/auditd.condrestart +++ b/init.d/auditd.condrestart @@ -2,7 +2,7 @@ # Helper script to provide legacy auditd service options not # directly supported by systemd. -state=`service auditd status | awk '/^ Active/ { print $2 }'` +state=$(systemctl status auditd | awk '/Active:/ { print $2 }') if [ $state = "active" ] ; then /usr/libexec/initscripts/legacy-actions/auditd/restart RETVAL="$?" -- 2.33.0