[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DMODVERSIONS causing a lot of problems

On Thu, 16 Nov 2000 at 15:02:57 +0100, robert_wilhelm_land wrote:
> Colin, thanks for the very very quick answer!
> > > CONF   = $(wildcard /etc/modules.conf)
> > [...]
> > > install: compile
> > >    mv -f $(CONF) $(CONF).old
> > >    gawk -f mod_conf $(CONF).old > $(CONF)
> > >    echo "alias sound $(NAME)" >> $(CONF)
> > >    echo "alias midi $(NAME)" >> $(CONF)
> > 
> > Beware; this probably won't play nicely with Debian, because our
> > /etc/modules.conf isn't intended to be altered directly. 
> Could you explain this more accurate - does the system complain after
> booting that someone has altered /etc/modules.conf or does the kernel
> need a reboot to load the contents?

Neither - this is a Debian-specific thing to allow packages to edit
modules.conf. There are a number of Debian packages that want to install
kernel modules, but allowing each of them to edit modules.conf directly
looked like a recipe for disaster. Therefore, they each put their
configuration in separate files in /etc/modutils and run update-modules
after doing so. That tool merges /etc/modutils/* and puts the result in

There's a note at the top of /etc/modules.conf on Debian systems to this
effect. If you alter /etc/modules.conf directly, it will work fine up
until some package that installs kernel modules is installed or
upgraded, and then your changes will silently disappear!

> After all, why does /etc/modules.conf need to be edited by the make
> install20 procedure since this sound card is definetly a PCI device?

It's to allow you to use just 'modprobe sound' or 'modprobe midi' to
insert the aureal module; it's just some aliases.

> > What you probably want to do is set the CONF line above to somewhere
> > like /etc/modutils/aliases, and then insert 'update-modules' after
> > the last line I quoted here (at the same indentation level as the
> > other command lines, to keep make happy). That way, your changes to
> > your module configuration will be preserved.
> What is a "indentation level" and could you explain the CONF edition
> and 'update-modules' procedure more precisly - I'm getting so unsure
> what exactly to do.

Ah, OK. By "indentation level" I mean the spacing at the start of each

You need to change this line in the makefile:

CONF   = $(wildcard /etc/modules.conf)

... to:

CONF   = $(wildcard /etc/modutils/aliases)

> This is the original aureal make routine:
> --------
> install: compile
>          mv -f $(CONF) $(CONF).old
>          gawk -f mod_conf $(CONF).old > $(CONF)
>          echo "alias sound $(NAME)" >> $(CONF)
>          echo "alias midi $(NAME)" >> $(CONF)
>          mkdir -p $(MODDIR)
>          cp -f $(NAME).o $(MODDIR)
>          -/sbin/depmod -a
>          -/sbin/rmmod $(NAME)
>          -/sbin/modprobe $(NAME)
> --------

Change this to:

install: compile
	 mv -f $(CONF) $(CONF).old
	 gawk -f mod_conf $(CONF).old > $(CONF)
	 echo "alias sound $(NAME)" >> $(CONF)
	 echo "alias midi $(NAME)" >> $(CONF)
	 mkdir -p $(MODDIR)
	 cp -f $(NAME).o $(MODDIR)
	 -/sbin/depmod -a
	 -/sbin/rmmod $(NAME)
	 -/sbin/modprobe $(NAME)

Make sure that your editor preserves the tab character at the beginning
of each line here, and doesn't turn it into eight spaces, or make will
be unhappy. If you're using vim, for instance, ':set noexpandtab' will
do the job.

Alternatively, there's nothing holy about make - you could always just
run these commands manually from a shell after substituting the various
variables like $(NAME), or just fix up /etc/modules.conf and
/etc/modutils/aliases afterwards. The way I've outlined here is probably
easiest if you're not familiar with the Debian system.

Colin Watson                                     [cjw44@flatline.org.uk]

Reply to: