diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2012-07-02 22:04:22 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2012-07-26 10:54:48 -0500 |
commit | e641b4384977011b93c3c2a90222d459bc4c5ca6 (patch) | |
tree | 7846b824c0e040f096c6526d731aa8051c59452b /runlevels | |
parent | a6db2374fe69704ec55de86d815b127432328f24 (diff) |
Bring Back prefix support
We now have a team member who is interested in OpenRC on prefix, so I am
bringing it back to the main tree.
Diffstat (limited to 'runlevels')
-rw-r--r-- | runlevels/Makefile | 18 |
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 |