problems with MODULES_CONF_ALIAS_TYPE
Matt Domsch
Matt_Domsch at dell.com
Thu Feb 1 22:58:01 CST 2007
On Thu, Feb 01, 2007 at 02:47:19PM +0100, Jean-Christophe Dubois wrote:
> Hi,
>
> I am using DKMS for some drivers we have on FC5 using dkms 2.0.13-1.fc5.
>
> I tried to use MODULES_CONF_ALIAS_TYPE to have dkms updating the mprobe.conf
> file automatically. However I got a problem with this. DKMS seems to be
> unable to handle an alias with a '0' number. The smallest I can get is an
> alias with a '1' number.
>
> so if in the dkms.conf I put something like:
>
> BUILT_MODULE_NAME[0]="my_module"
> DEST_MODULE_LOCATION[0]="/extra"
> MODULES_CONF_ALIAS_TYPE[0]="my_device"
>
> I get (in modprobe.conf):
>
> alias my_device1 my_module
>
> This is due to the fact that DKMS seems to expect the "device" type to be
> already present in the modprobe.conf and it doesn't make a difference between
> my_device0 being there and no my_device at all. So if there is no my_device
> in the file it assumes there is a my_device0.
>
> this seems to come from this line:
>
> alias_number=$(( `grep "alias
> ${modules_conf_alias_type[$index]}"$moduleconfig | awk '{print $2}' |
> sed "s/${modules_conf_alias_type[$index]}//" | sort -n | tail -n 1` + 1 ))
>
> Is this a known issue? Am I missing something or missusing DKMS?
Good tracking this down. Is it really an issue though? The
my_deviceN values of N need only be increasing as recognized by
'sort', e.g. from Red Hat's mkinitrd:
scsimodules=`grep "alias[[:space:]]scsi_hostadapter" $modulefile | \
grep -v '^[ ]*#' | LC_ALL=C sort -u | awk '{ print $3 }'`
so yes, alias my_device comes before alias my_device0 which comes
before alias my_device1. It's doing the "+1" to make sure what it's
adding is later than any previously existing entry (e.g. to not screw
up your boot ordering by adding it at the beginning of the list thus
loading the new driver before older drivers).
Thanks,
Matt
--
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
More information about the DKMS-devel
mailing list