summaryrefslogtreecommitdiff
path: root/package/base-files/src/etc/init.d/boot
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/src/etc/init.d/boot')
-rw-r--r--package/base-files/src/etc/init.d/boot22
1 files changed, 20 insertions, 2 deletions
diff --git a/package/base-files/src/etc/init.d/boot b/package/base-files/src/etc/init.d/boot
index df2c493d7..fc2f79ac2 100644
--- a/package/base-files/src/etc/init.d/boot
+++ b/package/base-files/src/etc/init.d/boot
@@ -4,6 +4,26 @@
. /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
+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
touch /var/log/lastlog
@@ -22,6 +42,4 @@ 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