diff options
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | hook-functions | 24 |
2 files changed, 23 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog index c7f7ea1..431cf50 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,9 +21,10 @@ initramfs-tools (0.91) UNRELEASED; urgency=low Thanks martin f krafft <madduck@debian.org> for report. (closes: #441211) * init: Disable quiet on debug bootarg. Fix new init error message. Thanks Michael Prokop <mika@grml.org> for the patches. - * hook-functions: MODULES=dep fix I2O detection. + * hook-functions: MODULES=dep fix I2O detection. Add sys_walk_modalias() + to catch old style IDE. - -- maximilian attems <maks@debian.org> Sat, 08 Sep 2007 22:01:15 +0200 + -- maximilian attems <maks@debian.org> Sat, 08 Sep 2007 22:29:42 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/hook-functions b/hook-functions index 628811b..9becfe2 100644 --- a/hook-functions +++ b/hook-functions @@ -200,6 +200,20 @@ sys_walk_mod_add() done } +# walk /sys for relevant modalias +sys_walk_modalias() +{ + local device_path modalias + + device_path="$(dirname "${1}")" + device_path="$(dirname "${device_path}")" + modalias=$(cat "${device_path}/modalias") + + if [ -n "${modalias}" ]; then + force_load "${modalias}" + fi +} + # find and only copy root relevant modules dep_add_modules() { @@ -251,13 +265,15 @@ dep_add_modules() exit 1 fi + # sys walk ATA root_dev_path=$(readlink -f /sys/block/${block}/device) sys_walk_mod_add ${root_dev_path} - if [ -e /proc/ide ]; then - for x in ide-generic ide-disk ide-cd; do - manual_add_modules "${x}" - done + # catch old-style IDE + if [ -e /sys/bus/ide/devices/ ]; then + sys_walk_modalias ${root_dev_path} + manual_add_modules ide-disk + manual_add_modules ide-cd fi if [ -e /sys/bus/scsi/devices/ ]; then |