summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-10 10:40:48 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-10 10:41:19 +0200
commit536366a7565f07d7e2bdb9c0a1abe133010650ef (patch)
treedaa8cd018f6d55f34ef37160484383499951727b /package
parent74006e4088da71529d4f05f60a7ce53c1c4b6891 (diff)
move bootup code into rcS, we need to setup cfgfs before starting services
Diffstat (limited to 'package')
-rw-r--r--package/base-files/Makefile2
-rw-r--r--package/base-files/src/etc/init.d/boot46
-rwxr-xr-x[-rw-r--r--]package/base-files/src/etc/init.d/done0
-rwxr-xr-x[-rw-r--r--]package/base-files/src/etc/init.d/fs0
-rwxr-xr-xpackage/base-files/src/etc/init.d/kmod12
-rwxr-xr-xpackage/base-files/src/etc/init.d/rcS37
6 files changed, 49 insertions, 48 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 1c31ba485..ceb20837a 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk
PKG_NAME:= base-files
PKG_VERSION:= 1.0
-PKG_RELEASE:= 88
+PKG_RELEASE:= 89
PKG_SECTION:= base
PKG_DESCR:= basic files and scripts
diff --git a/package/base-files/src/etc/init.d/boot b/package/base-files/src/etc/init.d/boot
deleted file mode 100644
index 291bf6ab4..000000000
--- a/package/base-files/src/etc/init.d/boot
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-#INIT 10
-[[ $1 = autostart ]] || exit 0
-
-. /etc/functions.sh
-
-# remount /dev with smaller size
-mount -o remount,nosuid,size=128k,mode=0755 -t tmpfs mdev /dev
-
-# remount /tmp with smaller size
-size=$(cat /etc/tmpfs 2>/dev/null)
-[ -z $size ] && size=2048
-mount -o remount,nosuid,nodev,mode=1777,size=${size}k -t tmpfs tmpfs /tmp
-
-# start mdev dynamic device node management
-echo >/dev/mdev.seq
-echo "/sbin/mdev" >/proc/sys/kernel/hotplug
-# creates f.e. /dev/root
-mdev -s
-
-# seed some random
-cat /etc/.rnd >/dev/urandom 2>&1
-
-# setup cfgfs
-[ -x /sbin/cfgfs ] && { cfgfs setup; mount -o remount,ro /;} || mount -o remount,rw /
-
-# create some useful directories in tmpfs
-mkdir -p /var/log
-mkdir -p /var/run
-mkdir -p /var/tmp
-touch /var/log/lastlog
-touch /var/log/wtmp
-
-HOSTNAME=
-[[ -s /etc/hostname ]] && HOSTNAME=$(cat /etc/hostname)
-HOSTNAME=${HOSTNAME%%.*}
-echo ${HOSTNAME:=openadk} >/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
-exit 0
diff --git a/package/base-files/src/etc/init.d/done b/package/base-files/src/etc/init.d/done
index e5b655bb6..e5b655bb6 100644..100755
--- a/package/base-files/src/etc/init.d/done
+++ b/package/base-files/src/etc/init.d/done
diff --git a/package/base-files/src/etc/init.d/fs b/package/base-files/src/etc/init.d/fs
index 8bde402ec..8bde402ec 100644..100755
--- a/package/base-files/src/etc/init.d/fs
+++ b/package/base-files/src/etc/init.d/fs
diff --git a/package/base-files/src/etc/init.d/kmod b/package/base-files/src/etc/init.d/kmod
new file mode 100755
index 000000000..18aeedb42
--- /dev/null
+++ b/package/base-files/src/etc/init.d/kmod
@@ -0,0 +1,12 @@
+#!/bin/sh
+#INIT 10
+[[ $1 = autostart ]] || exit 0
+
+. /etc/functions.sh
+
+load_modules /etc/modules
+for f in /etc/modules.d/*; do
+ [[ -e $f ]] && load_modules /etc/modules.d/*
+ break
+done
+exit 0
diff --git a/package/base-files/src/etc/init.d/rcS b/package/base-files/src/etc/init.d/rcS
index 3a58d4d17..c7cbb31da 100755
--- a/package/base-files/src/etc/init.d/rcS
+++ b/package/base-files/src/etc/init.d/rcS
@@ -1,11 +1,46 @@
#!/bin/sh
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
# disable kernel messages
if [ -f /proc/sys/kernel/printk ];then
echo 0 > /proc/sys/kernel/printk
fi
ln -s /proc/self/fd/2 /dev/stderr
echo "System initialization ..."
-export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+# remount /dev with smaller size
+mount -o remount,nosuid,size=128k,mode=0755 -t tmpfs mdev /dev
+
+# start mdev dynamic device node management
+echo >/dev/mdev.seq
+echo "/sbin/mdev" >/proc/sys/kernel/hotplug
+# creates f.e. /dev/root
+mdev -s
+
+# seed some random
+cat /etc/.rnd >/dev/urandom 2>&1
+
+# setup cfgfs
+[ -x /sbin/cfgfs ] && { cfgfs setup; mount -o remount,ro /;} || mount -o remount,rw /
+
+# remount /tmp with smaller size
+size=$(cat /etc/tmpfs 2>/dev/null)
+[ -z $size ] && size=2048
+mount -o remount,nosuid,nodev,mode=1777,size=${size}k -t tmpfs tmpfs /tmp
+
+# create some useful directories in tmpfs
+mkdir -p /var/log
+mkdir -p /var/run
+mkdir -p /var/tmp
+touch /var/log/lastlog
+touch /var/log/wtmp
+
+HOSTNAME=
+[[ -s /etc/hostname ]] && HOSTNAME=$(cat /etc/hostname)
+HOSTNAME=${HOSTNAME%%.*}
+echo ${HOSTNAME:=openadk} >/proc/sys/kernel/hostname
+
+chown 0:0 /tmp; chmod 1777 /tmp
+
: ${rcquiet=0}
if test x"$rcquiet" = x"0" && sh -n /etc/rc.conf >/dev/null 2>&1; then
. /etc/rc.conf