localmount will handle the local fs' ,but it is not mounting my usbdevfs. I have the appropriate kernel options and my usbcore is being modprobed by the script. However it isnt mounting my system, and I have manually done mount -t usbdevfs usbdevfs /proc/bus/usb with success,so I can verify it works, not being executed by the script???
What version of baselayout ?
I'm sorry. That info would probably be useful:) I'm running 1.8.6.4-r1 now, all that appears to have changed is the get KV stuff, which looks okay to me, but IM drinking right now:)
Heh. When you are sober again, try this patch I added to localmount in CVS a week or so back: ----------------------------------------------------------------------- Index: init.d/localmount =================================================================== RCS file: /home/cvsroot/gentoo-src/rc-scripts/init.d/localmount,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- init.d/localmount 28 Feb 2003 15:45:35 -0000 1.15 +++ init.d/localmount 24 Mar 2003 14:09:41 -0000 1.16 @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/localmount,v 1.15 2003/02/28 15:45:35 azarah Exp $ +# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/localmount,v 1.16 2003/03/24 14:09:41 azarah Exp $ depend() { @@ -14,28 +14,38 @@ mount -at nocoda,nonfs,noproc,noncpfs,nosmbfs,noshm >/dev/null eend $? "Some local filesystem failed to mount" - # Check what kernel we are running ... - if [ "$(get_KV)" -ge "$(KV_to_int '2.5.0')" ] - then - USBFS="usbfs" - else - USBFS="usbdevfs" - fi - - # Cache whether USBFS is - USBBOOL="$(egrep "${USBFS}" /proc/filesystems)" - - # Mount usbdevfs if kernel have support - if [ -z "${USBBOOL}" ] + # Make sure we insert usbcore if its a module + if [ -f /proc/modules ] then # >/dev/null to hide errors from non-USB users modprobe usbcore &>/dev/null fi - if [ -n "${USBBOOL}" ] && \ + + # Check what USB fs the kernel support. Currently + # 2.5+ kernels, and later 2.4 kernels have 'usbfs', + # while older kernels have 'usbdevfs'. + local usbfs="$(awk ' + { + # Since 'usbfs' is the newer one, always try to use it + if ($2 == "usbfs") + USBFS = "usbfs" + # With my 2.4.20 kernel, 'usbdevfs' gets listed before 'usbfs', + # but this might change, so only change USBFS if it was not already + # set (and thus to 'usbfs'). + if (($2 == "usbdevfs") && (USBFS == "")) + USBFS = "usbdevfs" + } + + END { + if (USBFS != "") + print USBFS + }' /proc/filesystems)" + + if [ -n "${usbfs}" ] && \ [ -e /proc/bus/usb -a ! -e /proc/bus/usb/devices ] then - ebegin "Mounting USB device filesystem (${USBFS})" - mount -t ${USBFS} ${USBFS} /proc/bus/usb &>/dev/null + ebegin "Mounting USB device filesystem (${usbfs})" + mount -t ${usbfs} none /proc/bus/usb &>/dev/null eend $? "Failed to mount USB device filesystem" fi
That patch kicks ass. A couple of small questions,though. I thought that usbfs was going to be held off till 2.5? This is what Im mounting now. Also is it preferred to mount usbfs as (dev type) none, where the old one had to be (dev type) usbdevfs? Or is this superior evolution? Nice job on the patch:)Thanks:)
Like the comment says, current 2.4 kernels have it as well. It actually not something new .. they just changed the name. If you actually go into it, you will see that both usbfs and usbdevfs are listed in /proc/filesystems.
Fixed on CVS, will be in baselayout-1.8.6.5 shortly.