diff options
Diffstat (limited to 'sh.Linux')
-rwxr-xr-x | sh.Linux/init-early.sh | 23 | ||||
-rwxr-xr-x | sh.Linux/init.sh | 17 |
2 files changed, 11 insertions, 29 deletions
diff --git a/sh.Linux/init-early.sh b/sh.Linux/init-early.sh index 73855c3b..328b0a9d 100755 --- a/sh.Linux/init-early.sh +++ b/sh.Linux/init-early.sh @@ -1,28 +1,7 @@ #!/bin/sh -# Copyright 2007 Roy Marples +# Copyright 2007-2008 Roy Marples # All rights reserved -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. - # Try and set a font and as early as we can if [ -e /etc/runlevels/"${RC_DEFAULTLEVEL}"/consolefont \ -o -e /etc/runlevels/"${RC_BOOTLEVEL}"/consolefont ]; then diff --git a/sh.Linux/init.sh b/sh.Linux/init.sh index 8dc86f2b..9acf883a 100755 --- a/sh.Linux/init.sh +++ b/sh.Linux/init.sh @@ -4,12 +4,14 @@ # All rights reserved # udev needs these functions still :/ -try() { +try() +{ "$@" } _rc_get_kv_cache= -get_KV() { +get_KV() +{ [ -z "${_rc_get_kv_cache}" ] \ && _rc_get_kv_cache="$(uname -r)" @@ -18,7 +20,8 @@ get_KV() { return $? } -KV_to_int() { +KV_to_int() +{ [ -z $1 ] && return 1 local x=${1%%-*} @@ -36,7 +39,8 @@ KV_to_int() { echo "${KV_int}" } -single_user() { +single_user() +{ if [ "${RC_SYS}" = "VPS" ]; then einfo "Halting" halt -f @@ -58,7 +62,8 @@ single_user() { # which allows us to run depscan.sh # The tricky part is finding something our kernel supports # tmpfs and ramfs are easy, so force one or the other -mount_svcdir() { +mount_svcdir() +{ local fs= fsopts="-o rw,noexec,nodev,nosuid" devdir="none" devtmp="none" x= local svcsize=${svcsize:-1024} @@ -257,5 +262,3 @@ if [ -f /sbin/livecd-functions.sh -a -n "${CDBOOT}" ]; then fi . "${RC_LIBDIR}"/sh/init-common-post.sh - -# vim: set ts=4 : |