aboutsummaryrefslogtreecommitdiff
path: root/src/librc
diff options
context:
space:
mode:
Diffstat (limited to 'src/librc')
-rw-r--r--src/librc/Makefile1
-rw-r--r--src/librc/librc-depend.c9
-rw-r--r--src/librc/rc.h.in5
3 files changed, 9 insertions, 6 deletions
diff --git a/src/librc/Makefile b/src/librc/Makefile
index 902b14e9..d3f9cc41 100644
--- a/src/librc/Makefile
+++ b/src/librc/Makefile
@@ -18,6 +18,7 @@ include ${MK}/debug.mk
SED_CMD= -e 's:@PREFIX@:${PREFIX}:g'
SED_CMD+= -e 's:@LIB@:${LIBNAME}:g'
SED_CMD+= -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g'
+SED_CMD+= -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g'
_PKG_PREFIX_SH= if test -n "${PKG_PREFIX}" && test "${PKG_PREFIX}" != "/" && test "${PKG_PREFIX}" != "${PREFIX}"; then \
echo "-e 's:@PKG_PREFIX@:${PKG_PREFIX}:g'"; \
else \
diff --git a/src/librc/librc-depend.c b/src/librc/librc-depend.c
index 36d8782e..97421fab 100644
--- a/src/librc/librc-depend.c
+++ b/src/librc/librc-depend.c
@@ -31,7 +31,7 @@
#include "librc.h"
-#define GENDEP RC_LIBDIR "/sh/gendepends.sh"
+#define GENDEP RC_LIBEXECDIR "/sh/gendepends.sh"
#define RC_DEPCONFIG RC_SVCDIR "/depconfig"
@@ -647,6 +647,7 @@ static const DEPPAIR deppairs[] = {
static const char *const depdirs[] =
{
+ RC_SVCDIR,
RC_SVCDIR "/starting",
RC_SVCDIR "/started",
RC_SVCDIR "/stopping",
@@ -742,10 +743,10 @@ rc_deptree_update(void)
bool retval = true;
const char *sys = rc_sys();
- /* Some init scripts need RC_LIBDIR to source stuff
+ /* Some init scripts need RC_LIBEXECDIR to source stuff
Ideally we should be setting our full env instead */
- if (!getenv("RC_LIBDIR"))
- setenv("RC_LIBDIR", RC_LIBDIR, 0);
+ if (!getenv("RC_LIBEXECDIR"))
+ setenv("RC_LIBEXECDIR", RC_LIBEXECDIR, 0);
/* Phase 1 - source all init scripts and print dependencies */
if (!(fp = popen(GENDEP, "r")))
diff --git a/src/librc/rc.h.in b/src/librc/rc.h.in
index cb5258c5..89ebfedd 100644
--- a/src/librc/rc.h.in
+++ b/src/librc/rc.h.in
@@ -36,11 +36,12 @@ __BEGIN_DECLS
#define RC_SYSCONFDIR "@SYSCONFDIR@"
#define RC_LIBDIR "@PREFIX@/@LIB@/rc"
-#define RC_SVCDIR RC_LIBDIR "/init.d"
-#define RC_PLUGINDIR RC_LIBDIR "/plugins"
+#define RC_LIBEXECDIR "@LIBEXECDIR@"
+#define RC_SVCDIR RC_LIBEXECDIR "/init.d"
#define RC_RUNLEVELDIR RC_SYSCONFDIR "/runlevels"
#define RC_INITDIR RC_SYSCONFDIR "/init.d"
#define RC_CONFDIR RC_SYSCONFDIR "/conf.d"
+#define RC_PLUGINDIR RC_LIBDIR "/plugins"
/* PKG_PREFIX is where packages are installed if different from the base OS
* On Gentoo this is normally unset, on FreeBSD /usr/local and on NetBSD