[PATCH 29/48] Bashify module loading in rc.sysinit.

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



---
 rc.sysinit |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/rc.sysinit b/rc.sysinit
index f3e60b7..1d16224 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -92,16 +92,14 @@ if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then
 fi
 
 # Load modules from the MODULES array defined in rc.conf
-if ! [ "$load_modules" = "off" ]; then
-	if [ -f /proc/modules ]; then
-		stat_busy "Loading Modules"
-		for mod in "${MODULES[@]}"; do
-			if [ "$mod" = "${mod#!}" ]; then
-				/sbin/modprobe $mod
-			fi
-		done
-		stat_done
+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
+    stat_done
 fi
 
 # Wait for udev uevents
-- 
1.7.1



[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