From a44c286fdb6478992a0d99cf886fbdb6a67ea301 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 4 Mar 2007 20:31:53 +0000 Subject: nuke mdev and replace it with hotplug2 :) SVN-Revision: 6512 --- package/base-files/files/etc/functions.sh | 2 +- package/base-files/files/etc/hotplug2.rules | 7 +++++++ package/base-files/files/etc/init.d/boot | 7 +++++-- package/base-files/files/etc/mdev.conf | 5 ----- 4 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 package/base-files/files/etc/hotplug2.rules delete mode 100644 package/base-files/files/etc/mdev.conf (limited to 'package/base-files/files/etc') 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 -- cgit v1.1