summaryrefslogtreecommitdiff
path: root/package/base-files/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-03-04 20:31:53 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-03-04 20:31:53 +0000
commita44c286fdb6478992a0d99cf886fbdb6a67ea301 (patch)
tree1ce5c0323b48da12b74cfcfb750a7f7a5307c680 /package/base-files/files
parent0a056c9743749762a5d93463ecfd6f82137884db (diff)
downloadmtk-20170518-a44c286fdb6478992a0d99cf886fbdb6a67ea301.zip
mtk-20170518-a44c286fdb6478992a0d99cf886fbdb6a67ea301.tar.gz
mtk-20170518-a44c286fdb6478992a0d99cf886fbdb6a67ea301.tar.bz2
nuke mdev and replace it with hotplug2 :)
SVN-Revision: 6512
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-xpackage/base-files/files/etc/functions.sh2
-rw-r--r--package/base-files/files/etc/hotplug2.rules7
-rwxr-xr-xpackage/base-files/files/etc/init.d/boot7
-rw-r--r--package/base-files/files/etc/mdev.conf5
-rwxr-xr-xpackage/base-files/files/lib/network/config.sh2
-rwxr-xr-xpackage/base-files/files/sbin/hotplug-call (renamed from package/base-files/files/sbin/hotplug)2
-rwxr-xr-xpackage/base-files/files/sbin/ifdown2
-rwxr-xr-xpackage/base-files/files/sbin/mount_root2
-rwxr-xr-xpackage/base-files/files/usr/share/udhcpc/default.script2
9 files changed, 17 insertions, 14 deletions
diff --git a/package/base-files/files/etc/functions.sh b/package/base-files/files/etc/functions.sh
index c29ae77..4d84bb8 100755
--- a/package/base-files/files/etc/functions.sh
+++ b/package/base-files/files/etc/functions.sh
@@ -12,7 +12,7 @@ _C=0
NO_EXPORT=1
hotplug_dev() {
- env -i ACTION=$1 INTERFACE=$2 /sbin/hotplug net
+ env -i ACTION=$1 INTERFACE=$2 /sbin/hotplug-call net
}
append() {
diff --git a/package/base-files/files/etc/hotplug2.rules b/package/base-files/files/etc/hotplug2.rules
new file mode 100644
index 0000000..d2a931a
--- /dev/null
+++ b/package/base-files/files/etc/hotplug2.rules
@@ -0,0 +1,7 @@
+DEVPATH is set {
+ makedev /dev/%DEVICENAME% 0644
+}
+
+MODALIAS is set {
+ exec /sbin/modprobe -q %MODALIAS% ;
+}
diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot
index db7ec8c..ed5e7d8 100755
--- a/package/base-files/files/etc/init.d/boot
+++ b/package/base-files/files/etc/init.d/boot
@@ -20,8 +20,11 @@ start() {
# manually trigger hotplug before loading modules
for iface in $(awk -F: '/:/ {print $1}' /proc/net/dev); do
- /usr/bin/env -i ACTION=add INTERFACE="$iface" /sbin/hotplug net
+ /usr/bin/env -i ACTION=add INTERFACE="$iface" /sbin/hotplug-call net
done
-
+
+ /sbin/hotplug2 --persistent &
+ echo /sbin/hotplug-call > /proc/sys/kernel/hotplug
+
load_modules /etc/modules.d/*
}
diff --git a/package/base-files/files/etc/mdev.conf b/package/base-files/files/etc/mdev.conf
deleted file mode 100644
index 8935583..0000000
--- a/package/base-files/files/etc/mdev.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-null 0:0 777
-zero 0:0 666
-console 0:5 0600
-tty 0:5 0660
-ttyS* 0:20 640
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh
index 95954bf..8a59687 100755
--- a/package/base-files/files/lib/network/config.sh
+++ b/package/base-files/files/lib/network/config.sh
@@ -157,7 +157,7 @@ setup_interface() {
done
}
- env -i ACTION="ifup" INTERFACE="$config" DEVICE="$iface" PROTO=static /sbin/hotplug "iface" &
+ env -i ACTION="ifup" INTERFACE="$config" DEVICE="$iface" PROTO=static /sbin/hotplug-call "iface" &
;;
dhcp)
# prevent udhcpc from starting more than once
diff --git a/package/base-files/files/sbin/hotplug b/package/base-files/files/sbin/hotplug-call
index 189cfee..b1b6f97 100755
--- a/package/base-files/files/sbin/hotplug
+++ b/package/base-files/files/sbin/hotplug-call
@@ -1,8 +1,6 @@
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
-[ -x /sbin/mdev -a -n "$ACTION" -a -n "$DEVPATH" ] && /sbin/mdev "$@"
-
# bypass the normal hotplug path for firmware loading
# would otherwise cause problems with drivers like bcm43xx
[ "$1" = "firmware" -a "$ACTION" = "add" ] && {
diff --git a/package/base-files/files/sbin/ifdown b/package/base-files/files/sbin/ifdown
index 540c69f..e00a4e3 100755
--- a/package/base-files/files/sbin/ifdown
+++ b/package/base-files/files/sbin/ifdown
@@ -21,7 +21,7 @@ config_get proto "$cfg" proto
config_get iface "$cfg" device
[ "$proto" = "static" ] && {
- env -i ACTION="ifdown" INTERFACE="$config" DEVICE="$iface" PROTO=static /sbin/hotplug "iface" &
+ env -i ACTION="ifdown" INTERFACE="$config" DEVICE="$iface" PROTO=static /sbin/hotplug-call "iface" &
}
# call interface stop handler
diff --git a/package/base-files/files/sbin/mount_root b/package/base-files/files/sbin/mount_root
index 9a87fad..dd9d99d 100755
--- a/package/base-files/files/sbin/mount_root
+++ b/package/base-files/files/sbin/mount_root
@@ -12,7 +12,7 @@ else
mount -t tmpfs tmpfs /dev -o size=512K
mknod /dev/console c 5 1
mkdir /dev/shm
- /sbin/mdev -s
+ /sbin/hotplug2 --no-persistent --coldplug
fi
mkdir -p /dev/pts
mount none /dev/pts -t devpts
diff --git a/package/base-files/files/usr/share/udhcpc/default.script b/package/base-files/files/usr/share/udhcpc/default.script
index f39d21e..c723953 100755
--- a/package/base-files/files/usr/share/udhcpc/default.script
+++ b/package/base-files/files/usr/share/udhcpc/default.script
@@ -14,7 +14,7 @@ hotplug_event() {
config_get proto $ifc proto
[ "$proto" = "dhcp" ] || continue
- env -i ACTION="$1" INTERFACE="$ifc" DEVICE="$ifname" PROTO=dhcp /sbin/hotplug iface
+ env -i ACTION="$1" INTERFACE="$ifc" DEVICE="$ifname" PROTO=dhcp /sbin/hotplug-call iface
done
}