diff --git a/src/librc/librc.c b/src/librc/librc.c index b54496410..e17e7e345 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -233,23 +233,6 @@ get_systype(void) return systype; } -static const char * -detect_prefix(const char *systype) -{ -#ifdef PREFIX - return RC_SYS_PREFIX; -#else - if (systype) { - if (strcmp(systype, RC_SYS_NONE) == 0) - return NULL; - if (strcmp(systype, RC_SYS_PREFIX) == 0) - return RC_SYS_PREFIX; - } - - return NULL; -#endif -} - static const char * detect_container(const char *systype RC_UNUSED) { @@ -367,12 +350,9 @@ rc_sys(void) const char *sys; systype = get_systype(); - sys = detect_prefix(systype); + sys = detect_container(systype); if (!sys) { - sys = detect_container(systype); - if (!sys) { - sys = detect_vm(systype); - } + sys = detect_vm(systype); } return sys; diff --git a/src/librc/rc.h.in b/src/librc/rc.h.in index d90943b65..425cbd217 100644 --- a/src/librc/rc.h.in +++ b/src/librc/rc.h.in @@ -22,13 +22,10 @@ extern "C" { #endif -#define RC_PREFIX "@PREFIX@" #define RC_SYSCONFDIR "@SYSCONFDIR@" -#define RC_LIBDIR "@PREFIX@/@LIB@/rc" +#define RC_LIBDIR "/@LIB@/rc" #define RC_LIBEXECDIR "@LIBEXECDIR@" -#if defined(PREFIX) -#define RC_SVCDIR RC_LIBEXECDIR "/init.d" -#elif defined(__linux__) || (defined(__FreeBSD_kernel__) && \ +#if defined(__linux__) || (defined(__FreeBSD_kernel__) && \ defined(__GLIBC__)) || defined(__GNU__) #define RC_SVCDIR "/run/openrc" #else @@ -324,7 +321,6 @@ bool rc_service_daemons_crashed(const char *); #define RC_SYS_NONE "" #define RC_SYS_OPENVZ "OPENVZ" #define RC_SYS_LXC "LXC" -#define RC_SYS_PREFIX "PREFIX" #define RC_SYS_RKT "RKT" #define RC_SYS_SYSTEMD_NSPAWN "SYSTEMD-NSPAWN" #define RC_SYS_UML "UML"