From 0a132cdca508db86a62452dec081b316db880485 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Thu, 20 Sep 2012 16:04:48 -0500 Subject: fix RC_SVCDIR on prefix systems On prefix systems, RC_SVCDIR was being defined based on the host operating system. This is not correct because there will not be a /run directory in a prefix. This commit moves RC_SVCDIR on prefix systems to the same location as on non-Linux systems. --- Makefile | 4 +++- src/librc/rc.h.in | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b37de6b..2bbcc8e 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,9 @@ include ${MK}/dist.mk include ${MK}/git.mk _installafter: -ifneq ($(OS),Linux) +ifeq (${MKPREFIX},yes) + ${INSTALL} -d ${DESTDIR}/${LIBEXECDIR}/init.d + else ifneq (${OS},Linux) ${INSTALL} -d ${DESTDIR}/${LIBEXECDIR}/init.d endif ${INSTALL} -d ${DESTDIR}/${LIBEXECDIR}/tmp diff --git a/src/librc/rc.h.in b/src/librc/rc.h.in index 32dbef0..b5a87b5 100644 --- a/src/librc/rc.h.in +++ b/src/librc/rc.h.in @@ -37,7 +37,9 @@ __BEGIN_DECLS #define RC_SYSCONFDIR "@SYSCONFDIR@" #define RC_LIBDIR "@PREFIX@/@LIB@/rc" #define RC_LIBEXECDIR "@LIBEXECDIR@" -#ifdef __linux__ +#if defined(PREFIX) +#define RC_SVCDIR RC_LIBEXECDIR "/init.d" +#elif defined(__linux__) #define RC_SVCDIR "@PREFIX@/run/openrc" #else #define RC_SVCDIR RC_LIBEXECDIR "/init.d" -- cgit v1.2.3