meta-blackfinn/recipes-core/busybox/files/S20load_modules.sh
2020-01-23 18:58:15 +01:00

27 lines
667 B
Bash

#!/bin/sh
LOAD_DIR="/etc/modules-load.d"
MODULES="$(ls $LOAD_DIR)"
case "${1}" in
start)
for MOD in $MODULES;
do
while read module args;
do
# Ignore comments and blank lines
case "$module" in
""|"#"*) continue;;
esac
modprobe ${module} ${args}
done < $LOAD_DIR/$MOD
done
;;
*)
echo "Usage: ${0} {start}"
exit 1
;;
esac