From 0e70bdbf6a4428ac95976ad14b55c20a8aa0767a Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 7 Nov 2022 19:04:59 +0100 Subject: [PATCH] Handle if building with hook script but no script path Signed-off-by: Joachim Wiberg --- configure.ac | 2 +- src/plugin.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index b4edcad8..3c7b30cf 100644 --- a/configure.ac +++ b/configure.ac @@ -252,7 +252,7 @@ AS_IF([test "x$with_watchdog" != "xno"], [ AC_DEFINE_UNQUOTED(WDT_DEVNODE, "$watchdog", [Built-in watchdog device node])], [ watchdog=]) -AS_IF([test "x$enable_hook_scripts_plugin" = "xyes" -a "x$with_hook_scripts_path" != "xno"], [ +AS_IF([test "x$enable_hook_scripts_plugin" != "xno"], [ AS_IF([test "x$hook_scripts_path" = "xyes"], [hook_scripts_path=$libexecdir/finit/hook]) AC_EXPAND_DIR(hook_scripts_path, "$hook_scripts_path") AC_DEFINE_UNQUOTED(PLUGIN_HOOK_SCRIPTS_PATH, "$hook_scripts_path", [Built-in default: $libexecdir/finit])]) diff --git a/src/plugin.c b/src/plugin.c index e0222493..46c66bb2 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -195,7 +195,7 @@ int plugin_exists(hook_point_t no) return 0; } -#ifdef HAVE_HOOK_SCRIPTS_PLUGIN +#if defined(HAVE_HOOK_SCRIPTS_PLUGIN) && defined(PLUGIN_HOOK_SCRIPTS_PATH) #define CHOOSE(x, y) y static const char *hscript_paths[] = HOOK_TYPES; #undef CHOOSE