aboutsummaryrefslogtreecommitdiff
path: root/init.d
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 /init.d
parent7aa231de2e784b00267cb618b728cf0f754c9573 (diff)
Add tunable SYSCONFDIR
Diffstat (limited to 'init.d')
-rw-r--r--init.d/Makefile2
-rw-r--r--init.d/halt.sh.in10
-rw-r--r--init.d/local.in8
-rw-r--r--init.d/netmount.in4
4 files changed, 12 insertions, 12 deletions
diff --git a/init.d/Makefile b/init.d/Makefile
index 855462c7..38a3f412 100644
--- a/init.d/Makefile
+++ b/init.d/Makefile
@@ -1,4 +1,4 @@
-DIR= /etc/init.d
+DIR= ${INITDIR}
SRCS= bootmisc.in fsck.in halt.sh.in hostname.in local.in localmount.in \
netmount.in root.in swap.in urandom.in
BIN= ${OBJS}
diff --git a/init.d/halt.sh.in b/init.d/halt.sh.in
index dca6815c..bf2ba564 100644
--- a/init.d/halt.sh.in
+++ b/init.d/halt.sh.in
@@ -2,9 +2,9 @@
# Copyright 2007-2008 Roy Marples <roy@marples.name>
# All rights reserved. Released under the 2-clause BSD license.
-. /etc/init.d/functions.sh
+. /@SYSCONFDIR@/init.d/functions.sh
. "${RC_LIBDIR}"/sh/rc-functions.sh
-[ -r /etc/rc.conf ] && . /etc/rc.conf
+[ -r @SYSCONFDIR@/rc.conf ] && . @SYSCONFDIR@/rc.conf
# Support LiveCD foo
if [ -r /sbin/livecd-functions.sh ]; then
@@ -28,8 +28,8 @@ sync; sync
# 1) we don't need (and by default can't) umount anything (VServer) or
# 2) the host utils take care of all umounting stuff (OpenVZ)
if [ "${RC_SYS}" = "VSERVER" -o "${RC_SYS}" = "OPENVZ" ]; then
- if [ -e /etc/init.d/"$1".sh ]; then
- . /etc/init.d/"$1".sh
+ if [ -e @SYSCONFDIR@/init.d/"$1".sh ]; then
+ . @SYSCONFDIR@/init.d/"$1".sh
else
exit 0
fi
@@ -93,7 +93,7 @@ if [ ${unmounted} -ne 0 ]; then
fi
# Load the final script - not needed on BSD so they should not exist
-[ -e /etc/init.d/"$1".sh ] && . /etc/init.d/"$1".sh
+[ -e @SYSCONFDIR@/init.d/"$1".sh ] && . @SYSCONFDIR@/init.d/"$1".sh
# Always exit 0 here
exit 0
diff --git a/init.d/local.in b/init.d/local.in
index 722d9714..bfc05107 100644
--- a/init.d/local.in
+++ b/init.d/local.in
@@ -19,8 +19,8 @@ start()
fi
# Support old configs
- if [ -e /etc/conf.d/local.start ]; then
- . /etc/conf.d/local.start
+ if [ -e @SYSCONFDIR@/conf.d/local.start ]; then
+ . @SYSCONFDIR@/conf.d/local.start
fi
eend $? "Failed to start local"
@@ -35,8 +35,8 @@ stop()
fi
# Support old configs
- if [ -e /etc/conf.d/local.stop ]; then
- . /etc/conf.d/local.stop
+ if [ -e @SYSCONFDIR@/conf.d/local.stop ]; then
+ . @SYSCONFDIR@/conf.d/local.stop
fi
eend $? $"Failed to stop local"
diff --git a/init.d/netmount.in b/init.d/netmount.in
index 3219c83c..38390fa5 100644
--- a/init.d/netmount.in
+++ b/init.d/netmount.in
@@ -26,7 +26,7 @@ depend()
local pmap=""
if need_portmap; then
pmap="${pmap} rpc.statd"
- [ -x /etc/init.d/rpcbind ] \
+ [ -x @SYSCONFDIR@/init.d/rpcbind ] \
&& pmap="rpcbind" \
|| pmap="portmap"
fi
@@ -40,7 +40,7 @@ depend()
start()
{
local myneed= myuse= pmap="portmap" nfsmounts=
- [ -x /etc/init.d/rpcbind ] && pmap="rpcbind"
+ [ -x @SYSCONFDIR@/init.d/rpcbind ] && pmap="rpcbind"
local x= fs=
for x in ${net_fs_list}; do