Move /etc/conf.d/rc to /etc/rc.conf.
Lowercase all configurable variables, non configurations remain uppercase. Replace rc_env_bool with rc_yesno. Split localmount info procfs (Linux) and dumpon, savecore (BSD)
This commit is contained in:
@@ -66,8 +66,8 @@ mount_svcdir() {
|
||||
devtmp="/dev/ram1"
|
||||
fs="ext2"
|
||||
for x in ${devdir} ${devtmp}; do
|
||||
try dd if=/dev/zero of="${x}" bs=1k count="${svcsize}"
|
||||
try mkfs -t "${fs}" -i 1024 -vm0 "${x}" "${svcsize}"
|
||||
try dd if=/dev/zero of="${x}" bs=1k count="${rc_svcsize:-1024}"
|
||||
try mkfs -t "${fs}" -i 1024 -vm0 "${x}" "${rc_svcsize:-1024}"
|
||||
done
|
||||
else
|
||||
echo
|
||||
@@ -99,12 +99,12 @@ mount_svcdir() {
|
||||
fi
|
||||
}
|
||||
|
||||
_RC_GET_KV_CACHE=""
|
||||
_rc_get_kv_cache=""
|
||||
get_KV() {
|
||||
[ -z "${_RC_GET_KV_CACHE}" ] \
|
||||
[ -z "${_rc_get_kv_cache}" ] \
|
||||
&& _RC_GET_KV_CACHE="$(uname -r)"
|
||||
|
||||
echo "$(KV_to_int "${_RC_GET_KV_CACHE}")"
|
||||
echo "$(KV_to_int "${_rc_get_kv_cache}")"
|
||||
|
||||
return $?
|
||||
}
|
||||
@@ -112,12 +112,13 @@ get_KV() {
|
||||
. /etc/init.d/functions.sh
|
||||
. "${RC_LIBDIR}"/sh/init-functions.sh
|
||||
. "${RC_LIBDIR}"/sh/rc-functions.sh
|
||||
[ -r /etc/rc.conf ] && . /etc/rc.conf
|
||||
|
||||
# Set the console loglevel to 1 for a cleaner boot
|
||||
# the logger should anyhow dump the ring-0 buffer at start to the
|
||||
# logs, and that with dmesg can be used to check for problems
|
||||
if [ -n "${RC_DMESG_LEVEL}" -a "${RC_SYS}" != "VPS" ]; then
|
||||
dmesg -n "${RC_DMESG_LEVEL}"
|
||||
if [ -n "${dmesg_level}" -a "${RC_SYS}" != "VPS" ]; then
|
||||
dmesg -n "${dmesg_level}"
|
||||
fi
|
||||
|
||||
check_statedir /proc
|
||||
@@ -192,14 +193,14 @@ fi
|
||||
# - check boot parameters
|
||||
# - make sure the required binaries exist
|
||||
# - make sure the kernel has support
|
||||
if [ "${RC_DEVICES}" = "static" -o "${RC_SYS}" = "VPS" ]; then
|
||||
if [ "${rc_devices}" = "static" -o "${RC_SYS}" = "VPS" ]; then
|
||||
ebegin "Using existing device nodes in /dev"
|
||||
eend 0
|
||||
elif [ "${RC_UNAME}" = "GNU/kFreeBSD" ]; then
|
||||
ebegin "Using kFreeBSD devfs in /dev"
|
||||
eend 0
|
||||
else
|
||||
case ${RC_DEVICES} in
|
||||
case ${rc_devices} in
|
||||
devfs) managers="devfs udev mdev";;
|
||||
udev) managers="udev devfs mdev";;
|
||||
mdev) managers="mdev udev devfs";;
|
||||
@@ -235,7 +236,7 @@ for x in "devpts /dev/pts 0755 ,gid=5,mode=0620" "tmpfs /dev/shm 1777 ,nodev"; d
|
||||
mountinfo -q "$2" && continue
|
||||
|
||||
if [ ! -d "$2" ] && \
|
||||
[ "${devfs}" = "yes" -o "${udev}" = "yes" ]; then
|
||||
[ "${m}" = "devfs" -o "${m}" = "udev" ]; then
|
||||
mkdir -m "$3" -p "$2" >/dev/null 2>/dev/null || \
|
||||
ewarn "Could not create $2!"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user