diff --git a/plugins/modules-load.c b/plugins/modules-load.c index 1fcf5e65..a8bc7d04 100644 --- a/plugins/modules-load.c +++ b/plugins/modules-load.c @@ -32,7 +32,9 @@ #include "service.h" #include "conf.h" +#ifndef MODULES_LOAD_PATH #define MODULES_LOAD_PATH "/etc/modules-load.d" +#endif #define SERVICE_LINE \ ":%d name:modprobe.%s [2345] /sbin/modprobe %s %s -- Kernel module: %s" diff --git a/src/helpers.c b/src/helpers.c index 3e3b42e4..5ea4d9a3 100644 --- a/src/helpers.c +++ b/src/helpers.c @@ -41,6 +41,10 @@ static int progress_style = PROGRESS_STYLE; +#ifndef HOSTNAME_PATH +#define HOSTNAME_PATH "/etc/hostname" +#endif + /* * Note: the pending status (⋯) must be last item. Also, ⋯ is not * off-by-one, it's a multi-byte character. @@ -287,7 +291,7 @@ void set_hostname(char **hostname) if (rescue) goto done; - fp = fopen("/etc/hostname", "r"); + fp = fopen(HOSTNAME_PATH, "r"); if (fp) { struct stat st;