Re: Serial module arguments !?

Gerd Knorr (kraxel@cs.tu-berlin.de)
Mon, 6 May 1996 20:51:00 +0200 (MET DST)


On Tue, 30 Apr 1996, Ian Macdonald wrote:

> On Mon, 29 Apr 1996, Theodore Y. Ts'o wrote:
>
> > From: Joshua Spoerri <josh@cooper.edu>
> > Date: Thu, 25 Apr 1996 14:01:38 -0400 (EDT)
> >
> > How can I pass arguments to the serial driver loadable module?
> > Specifically, how can i set an irq before loading?
> >
> > Right now.... you don't. You can however use setserial after the module
> > is loaded, though.
> >
> So if people are using kerneld to load the serial module they have to rerun
> setserial every time the module is loaded?

Yes. But this can done automatically (with new modutils) using something
like this in /etc/modules.conf:

# chararcter devices
alias char-major-4 serial
alias char-major-5 serial
post-install serial /etc/rc.d/rc.serial

/etc/rc.d/rc.serial:
#!/bin/bash
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
cat /proc/devices | grep "5 cua" > /dev/null || exit
setserial /dev/cua3 irq 10

The 'grep' line checks if the serial driver is present. This allows to
run the script at boot time too. So I have always the right irq, with
modularized and non-modularized serial driver :-)

--
Gerd Knorr <kraxel@cs.tu-berlin.de> | http://wwwwbs.cs.tu-berlin.de/~kraxel/