Fix default runlevel symlink paths
runlevels/Makefile currently uses ${PREFIX} when creating the initial runlevel symlinks, but the init files are installed to ${INITDIR}, which results in broken symlinks if ${SYSCONFDIR} is set to something other than ${PREFIX}/etc Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
This commit is contained in:
parent
18bdbb6870
commit
da842085ce
@ -14,7 +14,7 @@ ifeq (${MKNET},)
|
|||||||
BOOT+= network staticroute
|
BOOT+= network staticroute
|
||||||
endif
|
endif
|
||||||
|
|
||||||
INITDIR= ../init.d
|
INITFILES= ../init.d
|
||||||
|
|
||||||
MK= ../mk
|
MK= ../mk
|
||||||
include ${MK}/sys.mk
|
include ${MK}/sys.mk
|
||||||
@ -54,34 +54,34 @@ install:
|
|||||||
${INSTALL} -d ${SYSINITDIR} || exit $$?; \
|
${INSTALL} -d ${SYSINITDIR} || exit $$?; \
|
||||||
for x in ${SYSINIT}; do \
|
for x in ${SYSINIT}; do \
|
||||||
if test -n "${PREFIX}"; then \
|
if test -n "${PREFIX}"; then \
|
||||||
grep -q "keyword .*-prefix" ${INITDIR}/"$$x" && continue; \
|
grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \
|
||||||
fi; \
|
fi; \
|
||||||
ln -snf ${PREFIX}/etc/init.d/"$$x" ${SYSINITDIR}/"$$x" || exit $$?; done \
|
ln -snf ${INITDIR}/"$$x" ${SYSINITDIR}/"$$x" || exit $$?; done \
|
||||||
fi
|
fi
|
||||||
if ! test -d "${BOOTDIR}"; then \
|
if ! test -d "${BOOTDIR}"; then \
|
||||||
${INSTALL} -d ${BOOTDIR} || exit $$?; \
|
${INSTALL} -d ${BOOTDIR} || exit $$?; \
|
||||||
for x in ${BOOT}; do \
|
for x in ${BOOT}; do \
|
||||||
if test -n "${PREFIX}"; then \
|
if test -n "${PREFIX}"; then \
|
||||||
grep -q "keyword .*-prefix" ${INITDIR}/"$$x" && continue; \
|
grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \
|
||||||
fi; \
|
fi; \
|
||||||
ln -snf ${PREFIX}/etc/init.d/"$$x" ${BOOTDIR}/"$$x" || exit $$?; \
|
ln -snf ${INITDIR}/"$$x" ${BOOTDIR}/"$$x" || exit $$?; \
|
||||||
done \
|
done \
|
||||||
fi
|
fi
|
||||||
if ! test -d "${DEFAULTDIR}"; then \
|
if ! test -d "${DEFAULTDIR}"; then \
|
||||||
${INSTALL} -d ${DEFAULTDIR} || exit $$?; \
|
${INSTALL} -d ${DEFAULTDIR} || exit $$?; \
|
||||||
for x in ${DEFAULT}; do \
|
for x in ${DEFAULT}; do \
|
||||||
if test -n "${PREFIX}"; then \
|
if test -n "${PREFIX}"; then \
|
||||||
grep -q "keyword .*-prefix" ${INITDIR}/"$$x" && continue; \
|
grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \
|
||||||
fi; \
|
fi; \
|
||||||
ln -snf ${PREFIX}/etc/init.d/"$$x" ${DEFAULTDIR}/"$$x" || exit $$?; done \
|
ln -snf ${INITDIR}/"$$x" ${DEFAULTDIR}/"$$x" || exit $$?; done \
|
||||||
fi
|
fi
|
||||||
if ! test -d "${SHUTDOWNDIR}"; then \
|
if ! test -d "${SHUTDOWNDIR}"; then \
|
||||||
${INSTALL} -d ${SHUTDOWNDIR} || exit $$?; \
|
${INSTALL} -d ${SHUTDOWNDIR} || exit $$?; \
|
||||||
for x in ${SHUTDOWN}; do \
|
for x in ${SHUTDOWN}; do \
|
||||||
if test -n "${PREFIX}"; then \
|
if test -n "${PREFIX}"; then \
|
||||||
grep -q "keyword .*-prefix" ${INITDIR}/"$$x" && continue; \
|
grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \
|
||||||
fi; \
|
fi; \
|
||||||
ln -snf ${PREFIX}/etc/init.d/"$$x" ${SHUTDOWNDIR}/"$$x" || exit $$?; done \
|
ln -snf ${INITDIR}/"$$x" ${SHUTDOWNDIR}/"$$x" || exit $$?; done \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
check test::
|
check test::
|
||||||
|
Loading…
Reference in New Issue
Block a user