make init.sh and init-early.sh honor SYSCONFDIR
Fixes hardcoded paths that break when built with SYSCONFDIR set to anything other than /etc/ Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
This commit is contained in:
parent
746bf5f783
commit
cd4becf6cd
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
service_present()
|
service_present()
|
||||||
{
|
{
|
||||||
local p="/etc/runlevels/$1/$2"
|
local p="@SYSCONFDIR@/runlevels/$1/$2"
|
||||||
# fail if the file doesn't exist
|
# fail if the file doesn't exist
|
||||||
[ ! -e "$p" ] && return 1
|
[ ! -e "$p" ] && return 1
|
||||||
# succeed if $RC_SYS empty, can't check further, assume script will run
|
# succeed if $RC_SYS empty, can't check further, assume script will run
|
||||||
|
@ -22,7 +22,7 @@ mount_svcdir()
|
|||||||
}
|
}
|
||||||
|
|
||||||
. "$RC_LIBEXECDIR"/sh/functions.sh
|
. "$RC_LIBEXECDIR"/sh/functions.sh
|
||||||
[ -r /etc/rc.conf ] && . /etc/rc.conf
|
[ -r "@SYSCONFDIR@/rc.conf" ] && . "@SYSCONFDIR@/rc.conf"
|
||||||
|
|
||||||
# Disable devd until we need it
|
# Disable devd until we need it
|
||||||
if [ -z "$RC_SYS" -a "$RC_UNAME" = "FreeBSD" ]; then
|
if [ -z "$RC_SYS" -a "$RC_UNAME" = "FreeBSD" ]; then
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# Released under the 2-clause BSD license.
|
# Released under the 2-clause BSD license.
|
||||||
|
|
||||||
. "$RC_LIBEXECDIR"/sh/functions.sh
|
. "$RC_LIBEXECDIR"/sh/functions.sh
|
||||||
[ -r /etc/rc.conf ] && . /etc/rc.conf
|
[ -r "@SYSCONFDIR@/rc.conf" ] && . "@SYSCONFDIR@/rc.conf"
|
||||||
|
|
||||||
# By default VServer already has /proc mounted, but OpenVZ does not!
|
# By default VServer already has /proc mounted, but OpenVZ does not!
|
||||||
# However, some of our users have an old proc image in /proc
|
# However, some of our users have an old proc image in /proc
|
||||||
|
Loading…
Reference in New Issue
Block a user