From ae45b87f5f8503434a10baa0d95a4d2e5c0e9652 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 26 Mar 2010 05:46:03 +0100 Subject: 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 [ checked that this already works in Lenny ] Signed-off-by: maximilian attems --- hook-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3