![Andy Shevchenko](/assets/img/avatar_default.png)
The new change which enabled automatic module loading on boot does not handle
the cases when module alias includes spaces. It prevents modules to be loaded
since script fails:
% find /sys/ -name modalias | xargs sort -u
sort: /sys/devices/platform/Fixed: No such file or directory
First alias in question is "platform:Fixed MDIO bus".
Amend the script to support above like cases.
Fixes: 07f46c2b6d
("package/busybox: support automatic module loading with mdev")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
24 lines
343 B
Bash
24 lines
343 B
Bash
#!/bin/sh
|
|
#
|
|
# Start mdev....
|
|
#
|
|
|
|
case "$1" in
|
|
start)
|
|
echo "Starting mdev..."
|
|
echo /sbin/mdev >/proc/sys/kernel/hotplug
|
|
/sbin/mdev -s
|
|
# coldplug modules
|
|
find /sys/ -name modalias -print0 | xargs -0 sort -u -z | xargs -0 modprobe -abq
|
|
;;
|
|
stop)
|
|
;;
|
|
restart|reload)
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $?
|