On Sun, Apr 29, 2001 at 10:27:59AM +1000, Herbert Xu wrote: > On Sat, Apr 28, 2001 at 07:52:38PM -0400, Steve M. Robbins wrote: > > > > What is already handled by modutils? Loading the isa-pnp module? > > Configuring the PnP cards? > > Sorry, I wasn't talking about the same thing as you. But, what you want to > do can and should be done through modutils. By inserting a post-install > statement into a file in /etc/modutils, you can execute arbitrary commands > everytime the isapnp module is loaded.
Okay, so one can arrange to have cards configured when the isa-pnp module is loaded, by using a "post-install" statement. I hadn't thought of that. Is that what folks normally do for PnP cards? There isn't any kind of formal standard for hardware configuration that I can find --- I looked in Debian policy, Filesystem Hierarchy Standard, and Linux Standards Base. What is the best current practice? The immediate problem that I am facing is: what should the init script for isapnptools do? The status quo is: * if /proc/isapnp exists, the script does nothing, * otherwise isapnp runs (if its config file exists) The check for /proc/isapnp is there to detect kernel support for PnP configuration (added in kernel 2.3.something). I can think of two problems with this approach. 1. This assumes that the user has actually re-worked the system configuration to use the /proc/isapnp interface. If not, then upon the first boot into kernel 2.4, the system may be in a bad state (i.e. some cards not configured). 2. This does not detect isa-pnp compiled as a kernel module, since the /proc file does not exist until the module is loaded, and that happens *after* isapnp init script runs. I think that issue #2 is not a real problem. I believe that running the isapnptools' isapnp *and* also using the kernel's /proc/isapnp interface (when the isa-pnp module gets loaded) is harmless. The worst that will happen is that the card may be configured twice.[1] If true, then I am inclined to remove the check for /proc/isapnp in the init script. Hence isapnptools would continue to configure the card after the user upgrades to kernel 2.4, until she re-works the configuration to use the /proc/isapnp interface. This would alleviate issue #1. I would greatly value other's experience with PnP cards. I have just one, myself, and only just installed a 2.4 kernel on Friday to see what the new interface is like. It took me most of the evening to figure out how to re-create the old configuration. An upgrade to 2.4 shouldn't break a working system this badly! I'd really like a way to ease this transition for others. Is there, for example, a script to translate /etc/isapnp.conf into the new form? Thanks, -Steve 1. Of course this is bad if the two configs differ, but that would be caused by explicit user action. I am more concerned about someone installing a 2.4 kernel and getting surprised.