Bugzilla – Attachment 48882 Details for
Bug 114923
mkinitrd dies on module parameters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
With module.* parameter handling
switch-to-modprobe-2.diff (text/plain), 4.79 KB, created by
Andreas Gruenbacher
on 2005-09-06 07:10:02 UTC
(
hide
)
Description:
With module.* parameter handling
Filename:
MIME Type:
Creator:
Andreas Gruenbacher
Created:
2005-09-06 07:10:02 UTC
Size:
4.79 KB
patch
obsolete
>Index: mkinitrd >=================================================================== >RCS file: /suse/yast2/cvsroot/mkinitrd/mkinitrd,v >retrieving revision 1.220 >diff -u -r1.220 mkinitrd >--- mkinitrd 5 Sep 2005 14:35:41 -0000 1.220 >+++ mkinitrd 6 Sep 2005 07:06:14 -0000 >@@ -533,7 +533,9 @@ > NF == 0 { next } > $1 in seen { next } > { seen[$1]=1 >- print >+ # drop module parameters here: modprobe in the initrd >+ # will pick them up again. >+ print $1 > } > ' > rm -f $temp >@@ -1170,6 +1172,9 @@ > cp_bin $initrd_modprobe $tmp_mnt/sbin/modprobe 2>/dev/null \ > || error 5 "no static modprobe" > >+ cp -r $root_dir/etc/modprobe.conf $root_dir/etc/modprobe.conf.local \ >+ $root_dir/etc/modprobe.d $tmp_mnt/etc >+ > # SELinux: Binary policy file and load_policy utility for loading it. > if [ -n "$use_selinux" ] ; then > if [ -f /etc/security/selinux/policy.15 -a \ >@@ -1787,8 +1792,7 @@ > # Copy the modules to the initrd > echo -ne "Driver modules:\t" > initrd_is_using_modules= >- while read module params ; do >- [ -z "$module" ] && continue >+ for module in $drv_modules; do > echo -n "${module#lib/modules/$kernel_version/} " > if [ ! -r $root_dir/$module ]; then > oops 9 "Module $module not found." >@@ -1799,6 +1803,17 @@ > return > fi > >+ cat_linuxrc <<-EOF >+ |params= >+ |for p in \$(cat /proc/cmdline) ; do >+ | case \$p in >+ | $module.*) >+ | params="\$params \${p#$module.}" >+ | ;; >+ | esac >+ |done >+ EOF >+ > case "$module" in > */dasd_mod.*) > # kernel cmdline dasd parameter is placed into the environment. >@@ -1815,13 +1830,10 @@ > |for p in \$(cat /proc/cmdline) ; do > | case \$p in > | dasd=*) >- | dasd_params="\$p" >+ | params="\$params \$p" > | ;; > | esac > |done >- |mp="/$module\${dasd_params:+ dasd=\"\$dasd_params\"}" >- |echo "Loading \${mp#/lib/modules/$kernel_version/}" >- |insmod \$mp > EOF > ;; > */ide?core.*) >@@ -1838,9 +1850,9 @@ > | ;; > | esac > |done >- |mp="/$module\${ide_params:+ options=\"\$ide_params\"}" >- |echo "Loading \${mp#/lib/modules/$kernel_version/}" >- |insmod \$mp >+ |if [ -n "\$ide_params" ]; then >+ | params="\$params options=\"\$ide_params\"" >+ |fi > EOF > ;; > */scsi_mod*) >@@ -1854,7 +1866,7 @@ > |for p in \$(cat /proc/cmdline) ; do > | case \$p in > | scsi_mod.*) >- | extra_scsi_params="\$extra_scsi_params \${p#scsi_mod.}" >+ | params="\$params \${p#scsi_mod.}" > | ;; > | scsi_reportlun2=1) > | echo "scsi_reportlun2 compat: Use scsi_mod.default_dev_flags=0x20000 instead" >@@ -1886,29 +1898,24 @@ > | ;; > | max_luns=*|max_report_luns=*|inq_timeout=*|dev_flags=*|default_dev_flags=*) > | echo "scsi_mod compat: Please use prefix: scsi_mod.\$p" >- | extra_scsi_params="\$extra_scsi_params \$p" >+ | params="\$params \$p" > | ;; > | esac > |done > |if [ \$devflags != 0 ]; then >- | extra_scsi_params="default_dev_flags=\$devflags \$extra_scsi_params" >+ | params="default_dev_flags=\$devflags \$params" > |fi >- |mp="/$module\${extra_scsi_params:+ $extra_scsi_params}" >- |echo "Loading \${mp#/lib/modules/$kernel_version/}" >- |insmod \$mp >- EOF >- ;; >- *) >- mp="/$module${params:+ $params}" >- cat_linuxrc <<-EOF >- |echo "Loading ${mp#/lib/modules/$kernel_version/}" >- |insmod $mp > EOF > ;; > esac >+ module_basename=${module##*/} >+ cat_linuxrc <<-EOF >+ |echo "Loading ${module_basename%.ko}" >+ |modprobe ${module_basename%.ko} \$params >+ EOF > > initrd_is_using_modules=1 >- done < <(echo "$drv_modules") >+ done > echo > > if [ -z "$initrd_is_using_modules" ]; then >@@ -1925,14 +1932,14 @@ > uld_modules="$(resolve_modules $kernel_version $uld_modules)" > > # Now copy the upper level driver modules >- while read module params ; do >+ for module in $uld_modules; do > if [ ! -f $tmp_mnt/$module ]; then > if ! ( cd ${root_dir:-/} ; cp -p --parents $module $tmp_mnt ) ; then > oops 6 "Failed to add module $module." > return > fi > fi >- done < <(echo "$uld_modules") >+ done > > if [ -n "$s390_dasd_disks" ]; then > # We only need to activate DASDs manually if it >@@ -2283,8 +2290,7 @@ > # Load fs modules _after_ resume > echo -ne "Filesystem modules:\t" > initrd_is_using_modules= >- while read module params ; do >- [ -z "$module" ] && continue >+ for module in $fs_modules; do > echo -n "${module#lib/modules/$kernel_version/} " > if [ ! -r $root_dir/$module ]; then > oops 9 "Module $module not found." >@@ -2295,13 +2301,12 @@ > return > fi > >- mp="/$module${params:+ $params}" > cat_linuxrc <<-EOF >- |echo "Loading ${mp#/lib/modules/$kernel_version/}" >- |insmod $mp >+ |echo "Loading ${module#/lib/modules/$kernel_version/}" >+ |modprobe $module > EOF > initrd_is_using_modules=1 >- done < <(echo "$fs_modules") >+ done > echo > > # And run depmod to ensure proper loading
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 114923
:
48751
|
48854
| 48882