Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76410 - /etc/init.d/capi should be after coldplug
Summary: /etc/init.d/capi should be after coldplug
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-02 07:43 UTC by Oliver Schneider
Modified: 2005-01-06 10:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
capi.initd (capi.initd,1.15 KB, text/plain)
2005-01-03 10:56 UTC, Stefan Briesenick (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Schneider 2005-01-02 07:43:39 UTC
After switching to colplug and udev, the capi modules couldn't be loaded anymore because of missing /dev/capi20. Maybe this is only relevant to fcdsl users... (as me).
After expanding "after isapnp" to "after coldplug isapnp" in /etc/init.d/capi everything worked well.

Reproducible: Always
Steps to Reproduce:
1. switch to udev (inluding changing /etc/conf.d/rc to RC_DEVICE_TARBALL="no" and RC_DEVFSD_STARTUP="no")
2. switch to coldplug
3. reboot

Actual Results:  
The capi modules couldn't be loaded beacasue of missing /dev/capi20. 

Expected Results:  
The modules should be loeaded.
Comment 1 Alin Năstac (RETIRED) gentoo-dev 2005-01-02 22:52:49 UTC
Stefan, does this change have unwanted consequences?
Comment 2 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-03 09:31:39 UTC
no. It /etc/init.d/capi can be run before or after the hotplug-stuff. Both variants are working properly.

If you have only PCI cards and set up a proper /etc/capi.conf, you don't have problems at all.

If you have only USB cards then you also don't have problems. But if you want to start /etc/init.d/capi (which is not really needed then) you should have an empty /etc/capi.conf

Third option is to disable hotplug in /etc/conf.d/capi, bu then you have to setup all cards, including USB cards, in /etc/capi.conf

If you have both, PCI and USB cards, then you have the problem with the right order. if hotplug is initialized before /etc/init.d/capi, then USB cards have the lower numbers, PCI cards the higher numbers. Or vice versa, if you start hotplug after /etc/init.d/capi

My suggestion is: starting order doesn't matter, as long you have only 1 type of card (PCI *or* USB). If you have a mixed setup, then my suggestion is to setup all cards in /etc/capi.conf and disable /etc/conf.d/capi so you have control over the right order.
Comment 3 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-03 09:35:51 UTC
oh, btw: my hotplug-script loads all drivers! and it waits for udev, till it has created all the devices! /etc/init.d/capi is not needed! It's working properly with or without coldplug and with or without /etc/init.d/capi.

I tested it very excessive with a Fritz!USB v2.0, so it really works rocksolid! ;-)

But: you need the latest capi4k-utils!
Comment 4 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-03 09:40:21 UTC
hmm, perhaps we should add this (from /etc/hotplug/usb/capi):

       CNT=0  # wait for udev
       while [ ! -e /dev/capi20 -a $CNT -lt 10 ]; do
           sleep 1; : $((CNT++))
       done

also to /etc/init.d/capi

It has to be located after the modprobe stuff, but before the 'capiinit activate'.

Comment 5 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-03 10:56:01 UTC
Created attachment 47502 [details]
capi.initd

fixed capi.initd (/etc/init.d/capi). Put into $FILESDIR.
Comment 6 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-03 11:05:45 UTC
btw: coldplug is obsolete! You shouldn't need it at all!

All drivers should be loaded either via modules.autoload.d or via hotplug or an appropriate init-script. Coldplug is brute-force, creating "hotplug"-events for every device on all available busses.
Comment 7 Stefan Schweizer (RETIRED) gentoo-dev 2005-01-03 11:13:19 UTC
coldplug is not obsolete, because I want to do as little configuration as possible and colplug is user-friendly and I still use it .. its just not used by default, does not mean its obsolete.
Imo its the best way to do it and (finding out and) adding all modules to autoload is no alternative.
Btw, where do you know from, that it is obsolete? I would like to do something against its obsoleteion then ;)
Comment 8 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-03 11:47:50 UTC
coldplug is evil ;)

but nonetheless, with my litte patch, /etc/init.d/capi works with and without coldplug. So you can use it if you want or not. But depending on coldplug is not a good idea, though 'after' is not really a problem (while 'need' or 'use' is!).

btw: booting w/o coldplug is much faster on my machines. And I only have 2 or 3 modules in autoload.

btw^2: I'm from "old" Germany and most of the Gentoo capi4k-utils and isdn4k-utils stuff is my work. So I know all the scripts very well! That's why Alin asked me... ;-)
Comment 9 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-03 11:51:54 UTC
huh, I'm drunk. I can't read your posts correctly. ;-)

forget my last sentence. First of all, you know where I am, second you asked "Btw, where do you know from, that it is obsolete?" not where I'm from... *g*

Answer: I don't know. I've read it somewhere. And all my machines are running fine w/o coldplug. And booting is somewhat faster!
Comment 10 Alin Năstac (RETIRED) gentoo-dev 2005-01-06 10:19:34 UTC
the attached init.d script (with "after isapnp coldplug") is installed by -r5.