Skip to content

Commit d4fc31a

Browse files
committed
Add --disable-legacy-actions configure option
These scripts are largely unused, superseded by signals sent by systemd. While it may make sense to install them by default, the interpreter-less efforts on NixOS make the introduced bash dependency undesirable. With this change, `--disable-legacy-actions` can be passed to configure to disable these scripts.
1 parent 4ade146 commit d4fc31a

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

configure.ac

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,16 @@ AC_MSG_CHECKING(whether to include audisp ZOS remote plugin)
235235
AM_CONDITIONAL(ENABLE_ZOS_REMOTE, test "x$enable_zos_remote" != "xno")
236236
AC_MSG_RESULT($enable_zos_remote)
237237

238+
# legacy actions
239+
AC_MSG_CHECKING(whether to install legacy actions)
240+
AC_ARG_ENABLE(legacy-actions,
241+
[AS_HELP_STRING([--disable-legacy-actions],
242+
[Disable legacy actions])],
243+
install_legacy_actions=$enableval,
244+
install_legacy_actions=yes)
245+
AM_CONDITIONAL(INSTALL_LEGACY_ACTIONS, test "x$install_legacy_actions" != "xno")
246+
AC_MSG_RESULT($install_legacy_actions)
247+
238248
#gssapi
239249
AC_ARG_ENABLE(gssapi_krb5,
240250
[AS_HELP_STRING([--enable-gssapi-krb5],[Enable GSSAPI Kerberos 5 support @<:@default=no@:>@])],

init.d/Makefile.am

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,23 @@ install-data-hook:
5353

5454
install-exec-hook:
5555
mkdir -p ${DESTDIR}${initdir}
56-
mkdir -p ${DESTDIR}${legacydir}
5756
mkdir -p ${DESTDIR}${sysconfdir}/bash_completion.d
5857
$(INSTALL_SCRIPT) -D -m 644 ${builddir}/auditd.service ${DESTDIR}${initdir}
5958
$(INSTALL_SCRIPT) -D -m 644 ${builddir}/audit-rules.service ${DESTDIR}${initdir}
59+
chmod 0755 $(DESTDIR)$(sbindir)/augenrules
60+
$(INSTALL_SCRIPT) -D -m 644 ${srcdir}/audit.bash_completion \
61+
${DESTDIR}${sysconfdir}/bash_completion.d/
62+
if INSTALL_LEGACY_ACTIONS
63+
mkdir -p ${DESTDIR}${legacydir}
6064
$(INSTALL_SCRIPT) -D -m 750 ${srcdir}/auditd.rotate ${DESTDIR}${legacydir}/rotate
6165
$(INSTALL_SCRIPT) -D -m 750 ${srcdir}/auditd.resume ${DESTDIR}${legacydir}/resume
6266
$(INSTALL_SCRIPT) -D -m 750 ${srcdir}/auditd.reload ${DESTDIR}${legacydir}/reload
6367
$(INSTALL_SCRIPT) -D -m 750 ${srcdir}/auditd.state ${DESTDIR}${legacydir}/state
6468
$(INSTALL_SCRIPT) -D -m 750 ${srcdir}/auditd.stop ${DESTDIR}${legacydir}/stop
6569
$(INSTALL_SCRIPT) -D -m 750 ${srcdir}/auditd.restart ${DESTDIR}${legacydir}/restart
6670
$(INSTALL_SCRIPT) -D -m 750 ${srcdir}/auditd.condrestart ${DESTDIR}${legacydir}/condrestart
67-
chmod 0755 $(DESTDIR)$(sbindir)/augenrules
68-
$(INSTALL_SCRIPT) -D -m 644 ${srcdir}/audit.bash_completion \
69-
${DESTDIR}${sysconfdir}/bash_completion.d/
71+
endif
72+
7073
uninstall-hook:
7174
rm ${DESTDIR}${sysconfdir}/${libconfig}
7275
rm ${DESTDIR}${initdir}/auditd.service

0 commit comments

Comments
 (0)