mdev coldplugging
Rob Landley
rob at landley.net
Fri Jul 14 17:57:37 UTC 2006
On Thursday 13 July 2006 12:10 pm, Natanael Copa wrote:
> I'm experimenting with udev, netlink and /sys/*/*/uevent that are used
> in newer kernels.
>
> You can search for uevent files in /sys and trigger events.
>
> for i in `find /sys -name uevent`; do
> echo add > $i ;
> done
Ok, so you're telling the system that the device was just hotplugged in.
Presumably, if mdev is called from /sbin/hotplug (or you echo "/sbin/mdev"
> /proc/sys/kernel/hotplug) then the kernel would call mdev to handle the add
event.
> With udev you can then monitor /dev/.udev/queue to detect when all the
> drivers are loaded.
>
> while [ -d /dev/.udev/queue ] ; do
> echo -n "."
> sleep 1
> done
>
> My question is, is there some way to do the same with busybox mdev?
What exactly are you trying to do? Your for loop there continues as long as a
udev temporary directory exists...?
Possibly you want a loop doing:
while /bin/true
do
x=`./busybox ps`
x=`echo $x | grep mdev`
[ -z "$x" ] && break
echo -n .
sleep 1
done
That's a wild guess, not having tried it and not quite being clear on what you
want to accomplish...
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list