#!/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