* [gentoo-dev] handling of usb in init scripts
@ 2001-09-19 14:02 scott worley
2001-09-19 14:12 ` Daniel Robbins
0 siblings, 1 reply; 3+ messages in thread
From: scott worley @ 2001-09-19 14:02 UTC (permalink / raw
To: gentoo-dev
Hi,
Running rc6-r12. I'm no init expert but it appears the localmount
script assumes usbcore support is compiled, not modularized. I rebuilt
the kernel will all usb as modules so /proc/bus/usb does not exist until
the usbcore module is loaded, therefore mounting of usbdevfs fails. I
can change localmount to load usbcore but in the general case the script
needs to detect whether usbcore is modularized or not so no error is
generated by trying to load a module which doesn't exist. Should this
be done in localmount or in the script which mounts the root filesystem r/w?
thanks,
scott worley
folokai@earthlink.net
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-dev] handling of usb in init scripts
2001-09-19 14:02 [gentoo-dev] handling of usb in init scripts scott worley
@ 2001-09-19 14:12 ` Daniel Robbins
2001-09-19 14:56 ` scott worley
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Robbins @ 2001-09-19 14:12 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 894 bytes --]
On Wed, Sep 19, 2001 at 01:01:45PM -0700, scott worley wrote:
> Hi,
>
> Running rc6-r12. I'm no init expert but it appears the localmount
> script assumes usbcore support is compiled, not modularized. I rebuilt
> the kernel will all usb as modules so /proc/bus/usb does not exist until
> the usbcore module is loaded, therefore mounting of usbdevfs fails. I
> can change localmount to load usbcore but in the general case the script
> needs to detect whether usbcore is modularized or not so no error is
> generated by trying to load a module which doesn't exist. Should this
> be done in localmount or in the script which mounts the root filesystem r/w?
See if this new localmount script works for you:
(attached) Let me know if it does.
Best Regards,
--
Daniel Robbins <drobbins@gentoo.org>
Chief Architect/President http://www.gentoo.org
Gentoo Technologies, Inc.
[-- Attachment #2: localmount --]
[-- Type: text/plain, Size: 624 bytes --]
#!/sbin/runscript
depend() {
need checkfs
}
start() {
# Mount local filesystems in /etc/fstab.
ebegin "Mounting local filesystems"
mount -at nonfs,noproc,noncpfs,nosmbfs,noshm
eend $?
if [ -z "`grep usbdevfs /proc/filesystems`" ]
then
modprobe usbcore
fi
if [ -n "`grep usbdevfs /proc/filesystems`" ] && [ -e /proc/bus/usb ] && [ ! -e /proc/bus/usb/devices ]
then
ebegin "Mounting USB device filesystem"
mount -t usbdevfs usbdevfs /proc/bus/usb
eend $?
fi
#swap on loopback devices, and other weirdnesses
ebegin "Activating (possibly) more swap"
/sbin/swapon -a >/dev/null 2>&1
eend
return
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-dev] handling of usb in init scripts
2001-09-19 14:12 ` Daniel Robbins
@ 2001-09-19 14:56 ` scott worley
0 siblings, 0 replies; 3+ messages in thread
From: scott worley @ 2001-09-19 14:56 UTC (permalink / raw
To: gentoo-dev
Daniel Robbins wrote:
>On Wed, Sep 19, 2001 at 01:01:45PM -0700, scott worley wrote:
>
>>Hi,
>>
>>Running rc6-r12. I'm no init expert but it appears the localmount
>>script assumes usbcore support is compiled, not modularized. I rebuilt
>>the kernel will all usb as modules so /proc/bus/usb does not exist until
>>the usbcore module is loaded, therefore mounting of usbdevfs fails. I
>>can change localmount to load usbcore but in the general case the script
>>needs to detect whether usbcore is modularized or not so no error is
>>generated by trying to load a module which doesn't exist. Should this
>>be done in localmount or in the script which mounts the root filesystem r/w?
>>
>
>See if this new localmount script works for you:
>(attached) Let me know if it does.
>
>Best Regards,
>
>
>------------------------------------------------------------------------
>
>#!/sbin/runscript
>
>depend() {
> need checkfs
>}
>
>start() {
> # Mount local filesystems in /etc/fstab.
> ebegin "Mounting local filesystems"
> mount -at nonfs,noproc,noncpfs,nosmbfs,noshm
> eend $?
> if [ -z "`grep usbdevfs /proc/filesystems`" ]
> then
> modprobe usbcore
> fi
> if [ -n "`grep usbdevfs /proc/filesystems`" ] && [ -e /proc/bus/usb ] && [ ! -e /proc/bus/usb/devices ]
> then
> ebegin "Mounting USB device filesystem"
> mount -t usbdevfs usbdevfs /proc/bus/usb
> eend $?
> fi
> #swap on loopback devices, and other weirdnesses
> ebegin "Activating (possibly) more swap"
> /sbin/swapon -a >/dev/null 2>&1
> eend
> return
>}
>
Daniel,
It loads the usb module okay but the error message I'm seeing is because
of the usbdevfs entry in /etc/fstab. Once I commented that fstab entry
out then the init was flawless.
I added usb-ohci and printer to /etc/modules and the system found the
usb printer.
Thanks,
scott worley
folokai@earthlink.net
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-09-19 20:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-19 14:02 [gentoo-dev] handling of usb in init scripts scott worley
2001-09-19 14:12 ` Daniel Robbins
2001-09-19 14:56 ` scott worley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox