Changeset 8223
- Timestamp:
- 07/18/07 07:26:37 (1 year ago)
- Files:
-
- trunk/bootscripts/ChangeLog (modified) (1 diff)
- trunk/bootscripts/lfs/init.d/modules (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/bootscripts/ChangeLog
r8222 r8223 5 5 * lfs/init.d/modules: Remove the log level handling since this is 6 6 done in the consolelog script now. 7 * lfs/init.d/modules: Clean up the script by removing the file 8 descriptor duplication and instead just redirecting 9 /etc/sysconfig/modules to the input of the while loop. 7 10 8 11 2007-06-16 Dan Nicholson <dnicholson@linuxfromscratch.org> trunk/bootscripts/lfs/init.d/modules
r8222 r8223 22 22 start) 23 23 24 # Exit if there's no modules file or there are no 25 # valid entries 26 [ -r /etc/sysconfig/modules ] && 27 egrep -qv '^($|#)' /etc/sysconfig/modules || 28 exit 0 29 30 boot_mesg -n "Loading modules:" ${INFO} 31 24 32 # Only try to load modules if the user has actually given us 25 33 # some modules to load. 26 if egrep -qv '^(#|$)' /etc/sysconfig/modules 2>/dev/null 27 then 34 while read module args; do 28 35 29 # Read in the configuration file. 30 exec 9>&0 < /etc/sysconfig/modules 36 # Ignore comments and blank lines. 37 case "$module" in 38 ""|"#"*) continue ;; 39 esac 31 40 32 boot_mesg -n "Loading modules:" ${INFO} 41 # Attempt to load the module, making 42 # sure to pass any arguments provided. 43 modprobe ${module} ${args} >/dev/null 33 44 34 while read module args 35 do 36 # Ignore comments and blank lines. 37 case "${module}" in 38 ""|\#*) continue ;; 39 esac 45 # Print the module name if successful, 46 # otherwise take note. 47 if [ $? -eq 0 ]; then 48 boot_mesg -n " ${module}" ${NORMAL} 49 else 50 failedmod="${failedmod} ${module}" 51 fi 52 done < /etc/sysconfig/modules 40 53 41 # Attempt to load the module, making 42 # sure to pass any arguments provided. 43 modprobe ${module} ${args} > /dev/null 54 boot_mesg "" ${NORMAL} 55 # Print a message about successfully loaded 56 # modules on the correct line. 57 echo_ok 44 58 45 # Print the module name if successful, 46 # otherwise take note. 47 if [ ${?} -eq 0 ]; then 48 boot_mesg -n " ${module}" ${NORMAL} 49 else 50 failedmod="${failedmod} ${module}" 51 fi 52 done 53 54 boot_mesg "" ${NORMAL} 55 # Print a message about successfully loaded 56 # modules on the correct line. 57 echo_ok 58 59 # Print a failure message with a list of any 60 # modules that may have failed to load. 61 if [ "${failedmod}" ]; then 62 boot_mesg "Failed to load modules:${failedmod}" ${FAILURE} 63 echo_failure 64 fi 65 66 exec 0>&9 9>&- 67 59 # Print a failure message with a list of any 60 # modules that may have failed to load. 61 if [ -n "${failedmod}" ]; then 62 boot_mesg "Failed to load modules:${failedmod}" ${FAILURE} 63 echo_failure 68 64 fi 69 65 ;;
