summaryrefslogtreecommitdiff
path: root/hook-functions
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2010-03-26 05:46:03 +0100
committermaximilian attems <maks@debian.org>2010-03-26 05:48:13 +0100
commitae45b87f5f8503434a10baa0d95a4d2e5c0e9652 (patch)
treedb08e8e76e705b945cd5250285461b5f2ea524bd /hook-functions
parent110a03b4fa048c3018bc5a09c8969af48b654099 (diff)
downloadinitramfs-tools-ae45b87f5f8503434a10baa0d95a4d2e5c0e9652.tar.gz
initramfs-tools-ae45b87f5f8503434a10baa0d95a4d2e5c0e9652.zip
MODULES=DEP Use driver/module syfs attribute
I thought I'd experiment a bit with MODULES=DEP, but it seems this will not work. The atiixp module is properly installed into the initrd (I'm not sure how), but it doesn't end up in /conf/modules. Instead, the /conf/modules ends up as: radeonfb fbcon vesafb pci:v00001002d00004376sv00001462sd00000131bc01sc01i8a ide-gd ATIIXP_IDE pci:v00001002d00004376sv00001462sd00000131bc01sc01i8a unix Of these, the ide-gd and ATIIXP_IDE modules come from walking /sys/devices/pci0000\:00/0000\:00\:14.1/ide0/0.0/. However, the module is called atiixp, not ATIIXP_IDE. The ATIIXP_IDE comes directly from sysfs, though: readlink -f /sys/devices/pci0000\:00/0000\:00\:14.1/driver /sys/bus/pci/drivers/ATIIXP_IDE Using driver/module instead of just driver is more robust: $ readlink -f /sys/devices/pci0000\:00/0000\:00\:14.1/driver/module /sys/module/atiixp This would also fix the ide-gd module, which really seems to be called ide-gd_mod: $ readlink -f /sys/devices/pci0000\:00/0000\:00\:14.1/ide0/0.0/driver /sys/bus/ide/drivers/ide-gd $ readlink -f /sys/devices/pci0000\:00/0000\:00\:14.1/ide0/0.0/driver/module /sys/module/ide_gd_mod $ sudo modprobe ide-gd FATAL: Module ide_gd not found. $ sudo modprobe ide-gd_mod (closes: #567189) Reported-by: Matthijs Kooijman <matthijs@stdin.nl> [ checked that this already works in Lenny ] Signed-off-by: maximilian attems <maks@debian.org>
Diffstat (limited to 'hook-functions')
-rw-r--r--hook-functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/hook-functions b/hook-functions
index 189ad78..60bc2e9 100644
--- a/hook-functions
+++ b/hook-functions
@@ -218,7 +218,7 @@ sys_walk_mod_add()
while [ "${device_path}" != "/sys" ]; do
sys_walk_modalias ${device_path}
- driver_path="$(readlink -f ${device_path}/driver)"
+ driver_path="$(readlink -f ${device_path}/driver/module)"
if [ -e "$driver_path" ]; then
module="$(basename $(readlink -f $driver_path))"
if [ -n "${module}" ]; then