We currently fail if the following tests if the directory
/lib/modules/$(uname -r)/kernel/block does not exist. Just make
this optional. Older distributions won't have this directory.
srp/001
srp/002
srp/013
srp/014
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
# Load the I/O scheduler kernel modules
(
- cd "/lib/modules/$(uname -r)/kernel/block" &&
- for m in *.ko; do
- [ -e "$m" ] && modprobe "${m%.ko}"
- done
+ KERNEL_BLOCK="/lib/modules/$(uname -r)/kernel/block"
+ if [[ -d $KERNEL_BLOCK ]]; then
+ cd "$KERNEL_BLOCK" &&
+ for m in *.ko; do
+ [ -e "$m" ] && modprobe "${m%.ko}"
+ done
+ fi
)
if [ -d /sys/kernel/debug/dynamic_debug ]; then