Move the sourcing of software.sh to genkernel
[genkernel.git] / defaults / linuxrc
index 0403b4d51b77e3fa9ca12289ec988067c947f49a..f434339d128d00f5826f20ec19d2504e79777dcd 100755 (executable)
@@ -39,6 +39,7 @@ FAKE_ROOT=''
 REAL_ROOTFLAGS=''
 ROOTFSTYPE='auto'
 CRYPT_SILENT=0
+mkdir -p /etc/cmdline /etc/modprobe.d
 for x in ${CMDLINE}
 do
        case "${x}" in
@@ -240,6 +241,13 @@ do
                nounionfs)
                        USE_UNIONFS_NORMAL=0
                        ;;
+               *=*)
+                       case "${x%%=*}" in
+                       *.*)
+                               echo "${x#*.}" >> "/etc/module_options/${x%%.*}.conf"
+                       ;;
+                       esac
+               ;;
        esac
 done
 
@@ -285,7 +293,7 @@ mount_devfs
 # Mount sysfs
 mount_sysfs
 
-# Start mdev
+# Initialize mdev
 if [ "${KV_2_6_OR_GREATER}" ]
 then
        good_msg 'Activating mdev'
@@ -295,9 +303,6 @@ then
 
        # Setup hotplugging for firmware loading
        echo /sbin/mdev > /proc/sys/kernel/hotplug
-
-       # Setup mdev netlink socket daemon
-       ( cd /sys && mdev -s ) || bad_msg "Failed to receive dynamic updates from mdev"
 fi
 
 # Load modules listed in MY_HWOPTS if /lib/modules exists for the running kernel
@@ -321,6 +326,12 @@ else
        good_msg 'Skipping module load; no modules in the ramdisk!'
 fi
 
+# Ensure that device nodes are properly configured
+if [ "${KV_2_6_OR_GREATER}" ]
+then
+       mdev -s || bad_msg "mdev -s failed"
+fi
+
 # Apply scan delay if specified
 sdelay