aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-xpackage/base-files/files/etc/preinit3
-rwxr-xr-xpackage/base-files/files/sbin/mount_root3
2 files changed, 3 insertions, 3 deletions
diff --git a/package/base-files/files/etc/preinit b/package/base-files/files/etc/preinit
index b23508f552..34befe5ac7 100755
--- a/package/base-files/files/etc/preinit
+++ b/package/base-files/files/etc/preinit
@@ -10,6 +10,9 @@ failsafe() {
[ -e /etc/preinit.arch ] && . /etc/preinit.arch
+mount -t proc none /proc
+mount -t sysfs none /sys
+
set_state preinit
mount_root ${FAILSAFE:+failsafe}
diff --git a/package/base-files/files/sbin/mount_root b/package/base-files/files/sbin/mount_root
index a77a7f6453..eac4ef3968 100755
--- a/package/base-files/files/sbin/mount_root
+++ b/package/base-files/files/sbin/mount_root
@@ -2,8 +2,6 @@
# Copyright (C) 2006 OpenWrt.org
. /etc/functions.sh
-mount none /proc -t proc
-
size=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)?mt-l:s}' /proc/meminfo)
mount none /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777
@@ -13,7 +11,6 @@ if grep devfs /proc/filesystems > /dev/null; then
M1=/dev/pty/m1
HOTPLUG=/sbin/hotplug-call
else
- mount -t sysfs none /sys
mount -t tmpfs tmpfs /dev -o size=512K
mknod /dev/console c 5 1
mkdir /dev/shm