Move the sourcing of software.sh to genkernel
[genkernel.git] / defaults / linuxrc
index 6d156d78890ee7b28188f49dda58e3f1b34b17fa..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
 
@@ -250,7 +258,7 @@ fi
 
 # Set variables based on the value of REAL_ROOT
 case "${REAL_ROOT}" in
-       ZFS*)
+       ZFS=*)
                ZFS_POOL=${REAL_ROOT#*=}
                ZFS_POOL=${ZFS_POOL%%/*}
                USE_ZFS=1
@@ -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