From f3e064ec822b3dae191e1ae5d2bb921a970af86e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A4chler?= Date: Sun, 6 Apr 2008 15:40:08 +0200 Subject: Remove any special handling of usbfs from rc.sysinit libusb has migrated to /dev/bus/usb, which is managed by udev and thus more flexible. Some legacy applications (like VirtualBox) still use it. However, since users need special permissions to access usbfs, they have to be specified via mount options in fstab. So there are two cases: 1) a user does not need usbfs 2) a user needs it, but must add it to fstab to force the right permissions Our old special handling in rc.sysinit is thus obsolete (and it was ugly anyway). --- rc.sysinit | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'rc.sysinit') diff --git a/rc.sysinit b/rc.sysinit index 0d3c64a..9a49a7e 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -47,9 +47,6 @@ fi # mount /sys /bin/mount -n -t sysfs none /sys -# mount usbfs -/sbin/modprobe usbcore >/dev/null 2>&1 -/bin/grep -qw usbfs /proc/filesystems && /bin/mount -n -t usbfs none /proc/bus/usb # enable rtc access /sbin/modprobe rtc-cmos >/dev/null 2>&1 @@ -264,7 +261,7 @@ status "Mounting Root Read-only" /bin/mount -n -o remount,ro / FORCEFSCK= [ -f /forcefsck ] && FORCEFSCK="-- -f" -NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,nousbfs,noshfs,nofuse,nofuseblk" +NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuseblk" if [ -x /sbin/fsck ]; then stat_busy "Checking Filesystems" @@ -313,19 +310,10 @@ stat_busy "Mounting Local Filesystems" /bin/rm -f /etc/mtab* # make sure / gets written to /etc/mtab /bin/mount -o remount,rw / -# re-mount /proc , /sys and usbfs so they can be written to /etc/mtab -/bin/umount /proc/bus/usb +# re-mount /proc and /sys so they can be written to /etc/mtab if [ -e /proc/mounts ]; then /bin/grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts >> /etc/mtab fi -if /bin/grep -qw usbfs /proc/filesystems; then - # Some people use custom permissions for their usbfs - if /bin/grep -v "^#" /etc/fstab | /bin/grep -qw /proc/bus/usb ; then - /bin/mount /proc/bus/usb - else - /bin/mount -t usbfs none /proc/bus/usb - fi -fi # now mount all the local filesystems /bin/mount -a -t $NETFS stat_done -- cgit v1.2.3