# For target profile selection - the default set
DEFAULT_PACKAGES:=base-files libgcc uclibc bridge busybox dnsmasq dropbear iptables mtd ppp ppp-mod-pppoe mtd kmod-ipt-nathelper
+ifneq ($(KERNEL),2.4)
+ DEFAULT_PACKAGES+=udevtrigger hotplug2
+endif
ifeq ($(DUMP),1)
all: dumpinfo
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() {
--- /dev/null
+DEVPATH is set {
+ makedev /dev/%DEVICENAME% 0644
+}
+
+MODALIAS is set {
+ exec /sbin/modprobe -q %MODALIAS% ;
+}
# 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/*
}
+++ /dev/null
-null 0:0 777
-zero 0:0 666
-console 0:5 0600
-tty 0:5 0660
-ttyS* 0:20 640
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
+++ /dev/null
-#!/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" ] && {
- [ -f "/lib/firmware/$FIRMWARE" ] && {
- echo 1 > "/sys$DEVPATH/loading"
- cp "/lib/firmware/$FIRMWARE" "/sys$DEVPATH/data"
- echo 0 > "/sys$DEVPATH/loading"
- }
- exit 0
-}
-
-. /etc/functions.sh
-
-PATH=/bin:/sbin:/usr/bin:/usr/sbin
-LOGNAME=root
-USER=root
-export PATH LOGNAME USER
-
-[ \! -z "$1" -a -d /etc/hotplug.d/$1 ] && {
- for script in $(ls /etc/hotplug.d/$1/* 2>&-); do (
- [ -f $script ] && . $script
- ); done
-}
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
+# bypass the normal hotplug path for firmware loading
+# would otherwise cause problems with drivers like bcm43xx
+[ "$1" = "firmware" -a "$ACTION" = "add" ] && {
+ [ -f "/lib/firmware/$FIRMWARE" ] && {
+ echo 1 > "/sys$DEVPATH/loading"
+ cp "/lib/firmware/$FIRMWARE" "/sys$DEVPATH/data"
+ echo 0 > "/sys$DEVPATH/loading"
+ }
+ exit 0
+}
+
+. /etc/functions.sh
+
+PATH=/bin:/sbin:/usr/bin:/usr/sbin
+LOGNAME=root
+USER=root
+export PATH LOGNAME USER
+
+[ \! -z "$1" -a -d /etc/hotplug.d/$1 ] && {
+ for script in $(ls /etc/hotplug.d/$1/* 2>&-); do (
+ [ -f $script ] && . $script
+ ); done
+}
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
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
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
}
config BUSYBOX_CONFIG_MDEV
bool "mdev"
- default y
+ default n
help
mdev is a mini-udev implementation: call it with -s to populate
/dev from /sys, then "echo /sbin/mdev > /proc/sys/kernel/hotplug" to
config BUSYBOX_CONFIG_FEATURE_MDEV_CONF
bool "Support /etc/mdev.conf"
- default y
+ default n
depends on BUSYBOX_CONFIG_MDEV
help
The mdev config file contains lines that look like:
default y if LINUX_2_4
default n if LINUX_2_6
-config BUSYBOX_CONFIG_MDEV
- default n if LINUX_2_4
- default y if LINUX_2_6
-
-config BUSYBOX_CONFIG_FEATURE_MDEV_CONF
- default n if LINUX_2_4
- default y if LINUX_2_6
)}
[ "$ACTION" = "released" -a "$BUTTON" = "3g" ] && {
+ HOTPLUG="$(cat /proc/sys/kernel/hotplug)"
(echo /bin/true > /proc/sys/kernel/hotplug)
include /lib/network
}
config_load network
- (echo /sbin/hotplug > /proc/sys/kernel/hotplug)
+ (echo $HOTPLUG > /proc/sys/kernel/hotplug)
} &
#!/bin/sh
-[ -z "$6" ] || env -i ACTION="ifdown" INTERFACE="$6" PROTO=ppp /sbin/hotplug "iface"
+[ -z "$6" ] || env -i ACTION="ifdown" INTERFACE="$6" PROTO=ppp /sbin/hotplug-call "iface"
[ -d /etc/ppp/ip-down.d ] && {
for SCRIPT in /etc/ppp/ip-down.d/*
#!/bin/sh
-[ -z "$6" ] || env -i ACTION="ifup" INTERFACE="$6" PROTO=ppp /sbin/hotplug "iface"
+[ -z "$6" ] || env -i ACTION="ifup" INTERFACE="$6" PROTO=ppp /sbin/hotplug-call "iface"
[ -d /etc/ppp/ip-up.d ] && {
for SCRIPT in /etc/ppp/ip-up.d/*
--- /dev/null
+--- udev.old/udevtrigger.c 2007-03-03 18:42:09.000000000 +0100
++++ udev.dev/udevtrigger.c 2007-03-04 21:15:18.459211632 +0100
+@@ -446,7 +446,6 @@
+ };
+
+ logging_init("udevtrigger");
+- udev_config_init();
+ dbg("version %s", UDEV_VERSION);
+ sysfs_init();
+
lock -w /tmp/.failsafe
set_state preinit
-echo /sbin/hotplug > /proc/sys/kernel/hotplug
+echo /sbin/hotplug-call > /proc/sys/kernel/hotplug
ifconfig $ifname 0.0.0.0 down
mknod /dev/console c 5 1
mkdir /dev/pts
mkdir /dev/shm
- /sbin/mdev -s
+ /sbin/hotplug2 --no-persistent --coldplug
fi
mount none /dev/pts -t devpts