From 33bb6ed5acca30b0191e6c7ed7e1b55b7656a8cb Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Tue, 7 Jan 2020 12:56:52 +0100 Subject: [PATCH] Add --enable-logit to configure, disabled by default Since sysklogd now ships an excellent enhanced logger tool there is no need for Finit to provide its own tool for the same purpose by default. Signed-off-by: Joachim Nilsson --- configure.ac | 7 ++++++- src/Makefile.am | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 16bf09cd..5e3d2f72 100644 --- a/configure.ac +++ b/configure.ac @@ -73,6 +73,10 @@ AC_ARG_ENABLE(watchdog, AS_HELP_STRING([--enable-watchdog], [Enable built-in watchdog, uses /dev/watchdog]),,[ enable_watchdog=no]) +AC_ARG_ENABLE(logit, + AS_HELP_STRING([--enable-logit], [Enable logger (sysklogd) replacement, default: disabled]),,[ + enable_logit=no]) + AC_ARG_ENABLE(redirect, AS_HELP_STRING([--enable-redirect], [Redirect service output to /dev/null, default: no]),,[ enable_redirect_output=no]) @@ -144,7 +148,6 @@ AC_ARG_WITH(random-seed, AS_HELP_STRING([--with-random-seed=FILE], [Save a random seed for /dev/urandom across reboots, default /var/lib/misc/random-seed]), [random_seed=$withval], [random_seed=/var/lib/misc/random-seed]) - ### Enable features ########################################################################### # Create config.h from selected features and fallback defautls @@ -239,6 +242,7 @@ AS_IF([test "x$with_random_seed" != "xno"], [ AM_CONDITIONAL(STATIC, [test "x$enable_static" = "xyes"]) AM_CONDITIONAL(INETD, [test "x$enable_inetd" = "xyes"]) AM_CONDITIONAL(WATCHDOGD, [test "x$enable_watchdog" = "xyes"]) +AM_CONDITIONAL(LOGIT, [test "x$enable_logit" = "xyes"]) AM_CONDITIONAL(DOCS, [test "x$enable_docs" = "xyes"]) AM_CONDITIONAL(CONTRIB, [test "x$enable_contrib" = "xyes"]) @@ -284,6 +288,7 @@ Optional features: Built-in inetd........: $enable_inetd Built-in watchdogd....: $enable_watchdog Built-in logrotate....: $enable_logrotate + Scripting tool logit..: $enable_logit Emergency shell.......: $enable_emergency_shell Fallback shell........: $enable_fallback_shell Remount / RW at boot..: $enable_rw_rootfs diff --git a/src/Makefile.am b/src/Makefile.am index fa2b9cfe..c20940a7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -8,15 +8,17 @@ else AM_LDFLAGS = -export-dynamic endif -bin_PROGRAMS = logit sbin_PROGRAMS = finit initctl reboot pkglibexec_SCRIPTS = cgreaper.sh if WATCHDOGD pkglibexec_PROGRAMS = watchdogd endif +if LOGIT +bin_PROGRAMS = logit logit_SOURCES = logit.c logit_CFLAGS = -W -Wall -Wextra -Wno-unused-parameter -std=gnu99 +endif finit_SOURCES = api.c cgroup.c cgroup.h \ cond.c cond-w.c cond.h \