module-init-tools: config file for weak-modules

Matt_Domsch at Dell.com Matt_Domsch at Dell.com
Tue Mar 20 12:52:49 CST 2007


Both Red Hat and SuSE ship a version of module-init-tools weak-modules.
Each is placed in a different location, and each expects to find 3rd
party modules installed in a different directory under
/lib/modules/$kernelversion/.

DKMS 2.0.16 cares about both of these values as it installs its modules
and invokes weak-modules.  DKMS figures this out by getting the
distribution version from rpm -q --whatprovides {redhat,sles}-release.
This is ugly, as a) DKMS needs to know on a per-distribution/per-version
basis, and b) you can't really call rpm from within an rpm transaction
(e.g. the tg3-$version.dkms.rpm %post invokes dkms which invokes rpm to
get the OS version - lots of transaction lock warnings ensue).

I propose module-init-tools adds a config file,
/etc/sysconfig/module-init-tools, with values as such:

on Red Hat:
WEAK_MODULES_BIN='/sbin/weak-modules'
ADDON_MODULES_DIR='extra'

on SuSE:
WEAK_MODULES_BIN='/usr/lib/module-init-tools/weak-modules'
ADDON_MODULES_DIR='updates'


With this, DKMS and the weak-module executable can source in the config
file and use these variables accordingly for each distribution.

Thoughts?

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