[svlug] serial module: pre/post-install does not work

Erik Steffl steffl at bigfoot.com
Wed May 10 22:10:40 PDT 2000

Ray Olszewski wrote:
> Are you really saying that the command
>         /etc/init.d/setserial modload > /dev/null 2> /dev/null
> works properly from the command line? Since setserial takes its settings
> from stdin, I would expect you to need to enter it as

  it's not THE setserial (which on my system is /bin/setserial), it's a
script that is used by system to remember what the serial port settings
are and load them back (see the pre/post-install stuff from
/etc/modules.conf below). with modload parameter it loads parameters
from /var/run/setserial.conf (modsave save parameters). that part works
from command line.

> If that guess is wrong, the obvious way to debug is to change the entries to
>         /etc/init.d/setserial modload >/tmp/somename 2>&1
> and see what setserial *says* is going wrong.

  the problem is that it does not seem to be executed when serial module
is loaded/unloaded. I changed redirecting and the file where I
redirected it does not even get created. it looks like the given
post-install/pre-remove directives in /etc/modules.conf are ignored.

  any ideas how to figure out why it's not being executed?



> At 12:36 PM 5/7/00 -0700, Erik Steffl wrote:
> >  on a debian unstable + three serial ports (one of them internal modem
> >on /dev/ttyS2) I have following lines in /etc/modules.conf:
> >
> >post-install serial /etc/init.d/setserial modload > /dev/null 2>
> >/dev/null
> >pre-remove serial /etc/init.d/setserial modsave  > /dev/null 2>
> >/dev/null
> >
> >  the two commands save and load serial options to/from file
> >/var/run/setserial.conf, however they are not executed when the module
> >is loaded or removed (either automatically or by insmod/rmmod) [or they
> >are executed but fail]
> >
> >  both commands work fine when I execute them from command line (they
> >set up the serial port properly and save valid configuration)
> >
> >  how do I debug this? any ideas what's going on?
> ------------------------------------"Never tell me the odds!"---
> Ray Olszewski                                        -- Han Solo
> Palo Alto, CA                                    ray at comarre.com
> ----------------------------------------------------------------

More information about the svlug mailing list