summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-05 12:27:11 +0000
committerRoy Marples <roy@marples.name>2008-03-05 12:27:11 +0000
commita689b66023ad7b3da179b02c9e473cbc49f295e6 (patch)
treec1e6baad98bdfde3c36f1105b8fe6f15534b30c4 /sh
parent7aa231de2e784b00267cb618b728cf0f754c9573 (diff)
downloadopenrc-a689b66023ad7b3da179b02c9e473cbc49f295e6.tar.gz
openrc-a689b66023ad7b3da179b02c9e473cbc49f295e6.tar.bz2
openrc-a689b66023ad7b3da179b02c9e473cbc49f295e6.tar.xz
Add tunable SYSCONFDIR
Diffstat (limited to 'sh')
-rw-r--r--sh/Makefile6
-rw-r--r--sh/gendepends.sh.in10
-rw-r--r--sh/runscript.sh.in4
3 files changed, 10 insertions, 10 deletions
diff --git a/sh/Makefile b/sh/Makefile
index 57a567f..3ec217c 100644
--- a/sh/Makefile
+++ b/sh/Makefile
@@ -13,9 +13,9 @@ include Makefile.${SUBOS}
include ${MK}/scripts.mk
_installafter:
- ${INSTALL} -d ${DESTDIR}/${PREFIX}/etc/init.d
+ ${INSTALL} -d ${DESTDIR}/${PREFIX}/${INITDIR}
@# Provide an init script for the loopback interface
- ln -snf ${PREFIX}/${RC_LIB}/sh/net.sh ${DESTDIR}/${PREFIX}/etc/init.d/${NET_LO} || exit $$?
+ ln -snf ${PREFIX}/${RC_LIB}/sh/net.sh ${DESTDIR}/${PREFIX}/${INITDIR}/${NET_LO} || exit $$?
@# Put functions.sh into the init.d dir so 3rd party apps don't have to
@# be multilib aware
- ln -snf ${PREFIX}/${RC_LIB}/sh/functions.sh ${DESTDIR}/${PREFIX}/etc/init.d || exit $$?
+ ln -snf ${PREFIX}/${RC_LIB}/sh/functions.sh ${DESTDIR}/${PREFIX}/${INITDIR} || exit $$?
diff --git a/sh/gendepends.sh.in b/sh/gendepends.sh.in
index 2beba64..b09ea16 100644
--- a/sh/gendepends.sh.in
+++ b/sh/gendepends.sh.in
@@ -4,7 +4,7 @@
# Copyright 2007-2008 Roy Marples <roy@marples.name>
# All rights reserved. Released under the 2-clause BSD license.
-. @PREFIX@/etc/init.d/functions.sh
+. @PREFIX@/@SYSCONFDIR@/init.d/functions.sh
config() {
[ -n "$*" ] && echo "${SVCNAME} config $*" >&3
@@ -33,9 +33,9 @@ depend() {
_done_dirs=
for _dir in \
-@PREFIX@/etc/init.d \
-@PKG_PREFIX@/etc/init.d \
-@LOCAL_PREFIX@/etc/init.d
+@PREFIX@/@SYSCONFDIR@/init.d \
+@PKG_PREFIX@/@SYSCONFDIR@/init.d \
+@LOCAL_PREFIX@/@SYSCONFDIR@/init.d
do
[ -d "${_dir}" ] || continue
@@ -72,7 +72,7 @@ do
. "${_dir}/../conf.d/${SVCNAME}"
fi
- [ -e @PREFIX@/etc/rc.conf ] && . @PREFIX@/etc/rc.conf
+ [ -e @PREFIX@/@SYSCONFDIR@/rc.conf ] && . @PREFIX@/@SYSCONFDIR@/rc.conf
if . "${_dir}/${SVCNAME}"; then
echo "${SVCNAME}" >&3
diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in
index bf8489e..88e99bd 100644
--- a/sh/runscript.sh.in
+++ b/sh/runscript.sh.in
@@ -4,7 +4,7 @@
# Copyright 2007-2008 Roy Marples <roy@marples.name>
# All rights reserved. Released under the 2-clause BSD license.
-. @PREFIX@/etc/init.d/functions.sh
+. @PREFIX@/@SYSCONFDIR@/init.d/functions.sh
. "${RC_LIBDIR}"/sh/rc-functions.sh
# Support LiveCD foo
@@ -61,7 +61,7 @@ fi
unset _conf_d
# Load any system overrides
-[ -e @PREFIX@/etc/rc.conf ] && . @PREFIX@/etc/rc.conf
+[ -e @PREFIX@/@SYSCONFDIR@/rc.conf ] && . @PREFIX@/@SYSCONFDIR@/rc.conf
# Apply any ulimit defined
[ -n "${rc_ulimit:-${RC_ULIMIT}}" ] && ulimit ${rc_ulimit:-${RC_ULIMIT}}