From 9f8238d209eae43469edcc0d346d6ae7e5e4e129 Mon Sep 17 00:00:00 2001 From: asomers Date: Sun, 16 Dec 2018 23:38:46 +0000 Subject: [PATCH] Conditionally install /etc/rc.d/audit* based on ${MK_AUDIT} /usr/sbin/audit(dist)?d are only installed if ${MK_AUDIT} == yes. Their supporting scripts should only be installed in those instances as well. Submitted by: ngie Reviewed by: emaste MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd/pull/242 --- libexec/rc/rc.d/Makefile | 8 ++++++-- tools/build/mk/OptionalObsoleteFiles.inc | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index c2a39b5b4f4..d8d014cb167 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -15,8 +15,6 @@ CONFS= DAEMON \ addswap \ adjkerntz \ archdep \ - auditd \ - auditdistd \ bgfsck \ ${_blacklistd} \ ${_bluetooth} \ @@ -164,6 +162,12 @@ APM+= apmd APMPACKAGE= apm .endif +.if ${MK_AUDIT} != "no" +CONFGROUPS+= AUDIT +AUDIT+= auditd +AUDIT+= auditdistd +.endif + .if ${MK_AUTOFS} != "no" CONFS+= automount CONFS+= automountd diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 966a8813258..913c2ff7c27 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -147,6 +147,8 @@ OLD_FILES+=usr/share/man/man3/unistruct.3.gz .endif .if ${MK_AUDIT} == no +OLD_FILES+=etc/rc.d/auditd +OLD_FILES+=etc/rc.d/auditdistd OLD_FILES+=usr/sbin/audit OLD_FILES+=usr/sbin/auditd OLD_FILES+=usr/sbin/auditdistd -- 2.45.0