diff options
author | ncopa <ncopa@f176ef85-8d20-0410-844a-e957b5a1c371> | 2007-08-01 09:31:05 +0000 |
---|---|---|
committer | ncopa <ncopa@f176ef85-8d20-0410-844a-e957b5a1c371> | 2007-08-01 09:31:05 +0000 |
commit | e66604a2997b3ec11761b577afe141bf14bef648 (patch) | |
tree | 7109434c5a7e896b046af9dca2dff01bc17c9231 | |
parent | 1e5b745129dbbc89f5b79156c6ea1582811eb080 (diff) | |
download | alpine-baselayout-e66604a2997b3ec11761b577afe141bf14bef648.tar.bz2 alpine-baselayout-e66604a2997b3ec11761b577afe141bf14bef648.tar.xz |
only load usb module if modalias file exists
-rwxr-xr-x | usbdev | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4,12 +4,12 @@ case "$ACTION" in add|"") for i in /sys/class/usb_device/$MDEV/device/*/modalias ; do - modprobe `cat $i` 2>/dev/null + [ -r "$i" ] && modprobe `cat $i` 2>/dev/null done ;; remove) for i in /sys/class/usb_device/$MDEV/device/*/modalias ; do - modprobe -r `cat $i` 2>/dev/null + [ -r "$i" ] && modprobe -r `cat $i` 2>/dev/null done esac |