aboutsummaryrefslogtreecommitdiff
path: root/runlevels
diff options
context:
space:
mode:
Diffstat (limited to 'runlevels')
-rw-r--r--runlevels/Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/runlevels/Makefile b/runlevels/Makefile
index 25fa029f..c42b307a 100644
--- a/runlevels/Makefile
+++ b/runlevels/Makefile
@@ -53,24 +53,34 @@ install:
if ! test -d "${SYSINITDIR}"; then \
${INSTALL} -d ${SYSINITDIR} || exit $$?; \
for x in ${SYSINIT}; do \
- ln -snf ${PREFIX}/etc/init.d/"$$x" ${SYSINITDIR}/"$$x" || exit $$?; \
- done \
+ if test -n "${PREFIX}"; then \
+ grep -q "keyword .*-prefix" ${INITDIR}/"$$x" && continue; \
+ fi; \
+ ln -snf ${PREFIX}/etc/init.d/"$$x" ${SYSINITDIR}/"$$x" || exit $$?; done \
fi
if ! test -d "${BOOTDIR}"; then \
${INSTALL} -d ${BOOTDIR} || exit $$?; \
for x in ${BOOT}; do \
+ if test -n "${PREFIX}"; then \
+ grep -q "keyword .*-prefix" ${INITDIR}/"$$x" && continue; \
+ fi; \
ln -snf ${PREFIX}/etc/init.d/"$$x" ${BOOTDIR}/"$$x" || exit $$?; \
done \
fi
if ! test -d "${DEFAULTDIR}"; then \
${INSTALL} -d ${DEFAULTDIR} || exit $$?; \
for x in ${DEFAULT}; do \
- ln -snf ${PREFIX}/etc/init.d/"$$x" ${DEFAULTDIR}/"$$x" || exit $$?; \
- done \
+ if test -n "${PREFIX}"; then \
+ grep -q "keyword .*-prefix" ${INITDIR}/"$$x" && continue; \
+ fi; \
+ ln -snf ${PREFIX}/etc/init.d/"$$x" ${DEFAULTDIR}/"$$x" || exit $$?; done \
fi
if ! test -d "${SHUTDOWNDIR}"; then \
${INSTALL} -d ${SHUTDOWNDIR} || exit $$?; \
for x in ${SHUTDOWN}; do \
+ if test -n "${PREFIX}"; then \
+ grep -q "keyword .*-prefix" ${INITDIR}/"$$x" && continue; \
+ fi; \
ln -snf ${PREFIX}/etc/init.d/"$$x" ${SHUTDOWNDIR}/"$$x" || exit $$?; done \
fi