Use modprobe -a and a bash PE to filter the MODULES array. Signed-off-by: Dave Reisner <d@xxxxxxxxxxxxxx> --- rc.sysinit | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/rc.sysinit b/rc.sysinit index 09d5e97..07180d0 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -94,11 +94,7 @@ fi # Load modules from the MODULES array defined in rc.conf if [[ $load_modules != off && -f /proc/modules ]]; then stat_busy "Loading Modules" - for mod in "${MODULES[@]}"; do - if [[ $mod = ${mod#!} ]]; then - /sbin/modprobe $mod - fi - done + /sbin/modprobe -a "${MODULES[@]/\!*/}" stat_done fi -- 1.7.2.3