summaryrefslogtreecommitdiff
path: root/target/linux/generic-2.6/base-files/init
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-10-23 06:23:33 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-10-23 06:23:33 +0000
commitb513ee61a533dea631cb25a1c9ec9ad367b6d0b3 (patch)
treec36075f389a841a62015b0a408c7529d5c71630a /target/linux/generic-2.6/base-files/init
parent881bac2db254a4bfa52567233a0b264484c31fa1 (diff)
downloadmtk-20170518-b513ee61a533dea631cb25a1c9ec9ad367b6d0b3.zip
mtk-20170518-b513ee61a533dea631cb25a1c9ec9ad367b6d0b3.tar.gz
mtk-20170518-b513ee61a533dea631cb25a1c9ec9ad367b6d0b3.tar.bz2
only do hotplug2 init if hotplug2 is present
The current /init script unconditionally does the initialisation for hotplug2, including mounting a new /dev. If hotplug2 isn't present, we end up with no device nodes. This change only does the hotplug2 init if hotplug2 is present, but always mounts /sys. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> SVN-Revision: 9411
Diffstat (limited to 'target/linux/generic-2.6/base-files/init')
-rwxr-xr-xtarget/linux/generic-2.6/base-files/init5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/linux/generic-2.6/base-files/init b/target/linux/generic-2.6/base-files/init
index 9f595c0..98002ab 100755
--- a/target/linux/generic-2.6/base-files/init
+++ b/target/linux/generic-2.6/base-files/init
@@ -3,11 +3,12 @@
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
mount none /proc -t proc
+mount none /sys -t sysfs
if grep devfs /proc/filesystems > /dev/null; then
mount none /dev -t devfs
-else
- mount -t sysfs none /sys
+
+elif [ -x /sbin/hotplug2 ]; then
mount -t tmpfs tmpfs /dev -o size=512K
mknod /dev/console c 5 1
mkdir /dev/pts