diff options
author | Roy Marples <roy@marples.name> | 2007-11-23 12:04:11 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-11-23 12:04:11 +0000 |
commit | d81def80b00a3dbcb4f8980f4503c4d659b48a2a (patch) | |
tree | 64a5df4281620cacbc1f03838d42e88167886fc9 /sh.Linux | |
parent | f077f179edaeb746b267421baa29ec751c38b713 (diff) |
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)
Diffstat (limited to 'sh.Linux')
-rwxr-xr-x | sh.Linux/init.sh | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sh.Linux/init.sh b/sh.Linux/init.sh index 03e90386..84545b66 100755 --- a/sh.Linux/init.sh +++ b/sh.Linux/init.sh @@ -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 |