summaryrefslogtreecommitdiff
path: root/package/base-files/src/etc/init.d/boot
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-02-15 22:30:13 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-02-15 22:30:13 +0100
commitc57d0300bd42fabd8eeda2a95b6c3960d6e7ce07 (patch)
treeb53bc538246b5a900300b5c6b5ea740f978196f4 /package/base-files/src/etc/init.d/boot
parentcf4b3959527339206254b8c8fc44deb391beeb10 (diff)
parent023560ac69a2ecf5659c668c26c0af6b5612a46b (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Conflicts: package/nspr/Makefile
Diffstat (limited to 'package/base-files/src/etc/init.d/boot')
-rw-r--r--package/base-files/src/etc/init.d/boot29
1 files changed, 29 insertions, 0 deletions
diff --git a/package/base-files/src/etc/init.d/boot b/package/base-files/src/etc/init.d/boot
new file mode 100644
index 000000000..2ef6538e0
--- /dev/null
+++ b/package/base-files/src/etc/init.d/boot
@@ -0,0 +1,29 @@
+#!/bin/sh
+#INIT 10
+[[ $1 = autostart ]] || exit 0
+
+. /etc/functions.sh
+
+mkdir -p /var/log
+mkdir -p /var/run
+touch /var/log/lastlog
+touch /var/log/wtmp
+ln -s /var/tmp /tmp
+
+echo 0 > /proc/sys/kernel/printk
+
+HOSTNAME=
+[[ -s /etc/hostname ]] && HOSTNAME=$(cat /etc/hostname)
+HOSTNAME=${HOSTNAME%%.*}
+echo ${HOSTNAME:=linux} >/proc/sys/kernel/hostname
+
+chown 0:0 /tmp; chmod 1777 /tmp
+
+load_modules /etc/modules
+for f in /etc/modules.d/*; do
+ [[ -e $f ]] && load_modules /etc/modules.d/*
+ break
+done
+# settle down, after module load
+sleep 2
+exit 0