Hi, there is a bug in /sbin/rc which has cost me some hours wondering about many problems loading modules and so on. The script uses this many time for testing if devfs is mounted: mymounts="$(cat /proc/filesystems)" if [ "${mymounts/devfs//}" = "${mymounts}" ] ... Now, what happens if I have usbdevfs but no devfs? I leave this as an excercise for the reader. ;)) The solution is to test against ' devfs' (the space is important). Another solution is to first remove usbdevfs (and other *devfs* if there are more than usbdevfs) and than test against devfs. I haven't find that earlier because I had devfs compiled in, but disabled autoumount. And than devfs becomes mounted (I haven't searched why), but devfsd was not started. So I could modprobe anything, always wondering about no difference in my /dev. :( Kind regards, Alexander
Testing against ' devfs' always fails my side. mymounts="$(awk '$2 ~ "devfs" { print $0 }' /proc/filesystems)" #is devfs support compiled in? if [ -n "${mymounts}" ] Is IMHO the best solution.
To my shame I must tell you that I haven't test it. I've just looked at /proc/mounts and thought ' devfs' should do it. Here is the output: rootfs / rootfs rw 0 0 /dev/root / ext3 rw 0 0 none /dev devfs rw 0 0 proc /proc proc rw 0 0 tmpfs /mnt/.init.d tmpfs rw 0 0 usbdevfs /proc/bus/usb usbdevfs rw 0 0 I haven't changed my sbin/rc after discovering the bug, because with automount it has worked. Maybe '\ devfs' could do the trick without sed or awk. Regards, Alexander
tried that, '\tdevfs' '\t devfs' and other combinations. awk works best, as would cut, but cut is in /usr/bin.
Fix in CVS.