nuke mdev and replace it with hotplug2 :)
SVN-Revision: 6512
This commit is contained in:
@@ -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() {
|
||||
|
||||
7
package/base-files/files/etc/hotplug2.rules
Normal file
7
package/base-files/files/etc/hotplug2.rules
Normal file
@@ -0,0 +1,7 @@
|
||||
DEVPATH is set {
|
||||
makedev /dev/%DEVICENAME% 0644
|
||||
}
|
||||
|
||||
MODALIAS is set {
|
||||
exec /sbin/modprobe -q %MODALIAS% ;
|
||||
}
|
||||
@@ -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/*
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
null 0:0 777
|
||||
zero 0:0 666
|
||||
console 0:5 0600
|
||||
tty 0:5 0660
|
||||
ttyS* 0:20 640
|
||||
@@ -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
|
||||
|
||||
@@ -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" ] && {
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user