Re: [PATCH] rc.sysinit: only call modprobe once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sun, Sep 19, 2010 at 08:47:03PM -0400, Dave Reisner wrote:
> 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
> 

Seems I've forgotten about the null case here. Disregard this, I'll
resend.


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux