summaryrefslogtreecommitdiff
path: root/sh.Linux
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-11 12:13:46 +0000
committerRoy Marples <roy@marples.name>2008-01-11 12:13:46 +0000
commit3bf49a9bd19d5bbcf6976dd42b4f87f1b173e287 (patch)
tree8b4d6121f0d4b921566eeec2844c9bf76131de78 /sh.Linux
parent1f4422c72f968405a0b8bf56d4f9c3b619b1b80d (diff)
downloadopenrc-3bf49a9bd19d5bbcf6976dd42b4f87f1b173e287.tar.gz
openrc-3bf49a9bd19d5bbcf6976dd42b4f87f1b173e287.tar.bz2
openrc-3bf49a9bd19d5bbcf6976dd42b4f87f1b173e287.tar.xz
Adopt a more C style for scripts and remove vim settings.
Diffstat (limited to 'sh.Linux')
-rwxr-xr-xsh.Linux/init-early.sh23
-rwxr-xr-xsh.Linux/init.sh17
2 files changed, 11 insertions, 29 deletions
diff --git a/sh.Linux/init-early.sh b/sh.Linux/init-early.sh
index 73855c3..328b0a9 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 8dc86f2..9acf883 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 :