From 171ae7dc85168e723a388060ba1c85d0a30315be Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 13 Jul 2016 13:23:07 +0200 Subject: [PATCH] Add support for disabling the Netlink plugin Some vendors provide their own Netlink plugin to Finit. This patch makes it possible to disable the default netlink plugin from being built. However, even before this patch it was possible to overload the plugin. This just discards it from being built. Signed-off-by: Joachim Nilsson --- configure.ac | 2 ++ plugins/Makefile.am | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index b61a1a26..08c737cc 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,7 @@ AC_ARG_ENABLE(quiet, AS_HELP_STRING([--disable-quiet], [Disable quiet mode, default: silent after boot])) # Check for extra plugins to enable +enable_all_plugins=auto AC_PLUGIN([alsa-utils], [no], [Save and restore ALSA sound settings using alsactl]) AC_PLUGIN([dbus], [no], [Setup and start system message bus, D-Bus]) AC_PLUGIN([inetd-echo], [no], [Inetd plugin: echo server, RFC862]) @@ -60,6 +61,7 @@ AC_PLUGIN([inetd-time], [no], [Inetd plugin: time (rdate) server, RFC868]) AC_PLUGIN([lost], [no], [Example HOOK_SVC_LOST plugin, very noisy as-is!]) AC_PLUGIN([resolvconf], [no], [Setup necessary files for resolvconf]) AC_PLUGIN([x11-common], [no], [Console setup (for X)]) +AC_PLUGIN([netlink], [yes], [Basic netlink plugin for IFUP/IFDN and GW events. Can be replaced with externally built plugin that links with libnl or similar.]) # Check for extra arguments or packages AC_ARG_WITH(fifo, diff --git a/plugins/Makefile.am b/plugins/Makefile.am index ad620c55..7a9940e5 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -5,8 +5,7 @@ AM_CPPFLAGS += -DFINIT_FIFO=\"$(fifo)\" $(lite_CFLAGS) if STATIC noinst_LTLIBRARIES = libplug.la -libplug_la_SOURCES = bootmisc.c hwclock.c initctl.c netlink.c pidfile.c \ - tty.c urandom.c +libplug_la_SOURCES = bootmisc.c hwclock.c initctl.c pidfile.c tty.c urandom.c if BUILD_ALSA_UTILS_PLUGIN libplug_la_SOURCES += alsa-utils.c @@ -28,13 +27,16 @@ if BUILD_LOST_PLUGIN libplug_la_SOURCES += lost.c endif +if BUILD_NETLINK_PLUGIN +libplug_la_SOURCES += netlink.c +endif + if BUILD_RESOLVCONF_PLUGIN libplug_la_SOURCES += resolvconf.c endif else -pkglib_LTLIBRARIES = bootmisc.la hwclock.la initctl.la netlink.la pidfile.la \ - tty.la urandom.la +pkglib_LTLIBRARIES = bootmisc.la hwclock.la initctl.la pidfile.la tty.la urandom.la if BUILD_ALSA_UTILS_PLUGIN pkglib_LTLIBRARIES += alsa-utils.la @@ -56,6 +58,10 @@ if BUILD_LOST_PLUGIN pkglib_LTLIBRARIES += lost.la endif +if BUILD_NETLINK_PLUGIN +pkglib_LTLIBRARIES += netlink.la +endif + if BUILD_RESOLVCONF_PLUGIN pkglib_LTLIBRARIES += resolvconf.la endif