On Sat, Aug 15, 2015 at 2:48 PM, Isaac Dunham <[email protected]> wrote:
> For autoloading modules when hardware is hotplugged:
> # in /etc/mdev.conf:
> $MODALIAS=.*    root:root       0660    @modprobe -b "$MODALIAS"
>
> For autoloading modules when hardware is coldplugged, roughly as per
> Alpine Linux hwdrivers script:
> # in rc.sysinit or an init script:
> find /sys/devices -name modalias -type f -print0 | xargs -0 sort -u | \
>         xargs modprobe -ab 2>/dev/null
>
> Alternately:
> # grepping in uevent:
> grep -h MODALIAS /sys/bus/*/devices/*/uevent 2>/dev/null |cut -d = -f 2 \
>         | sort -u | xargs modprobe -ab 2>/dev/null
>
> # or using modalias:
> sort -u /sys/bus/*/devices/*/modalias 2>/dev/null \
>         | xargs modprobe -ab 2>/dev/null
>
> "sort -u" is not really necessary; it makes the modules load in a predictable
> order while removing some duplicates, so that interfaces and devices will
> be named consistently.
>
> HTH,
> Isaac Dunham

thank you Isaac, that's what I was looking for. :)
The last method goes the fastest for my hw.
By the way, why the kernel doesn't do that cold-plug by default ?
Cheers, linuxcbon
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to