Browse Source

usb: get rc scripts out amd64/bin/usb

I don't know why there were rc scripts in amd64/; get them
out of there.

And, there was already a usbfat: in rc/bin!

Change-Id: Iea72fd48dc1b1751f7f5c1bc08c763f49475e7ac
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Ronald G. Minnich 8 years ago
parent
commit
4cf40c463f
2 changed files with 0 additions and 59 deletions
  1. 0 59
      386/bin/usb/usbfat:
  2. 0 0
      rc/bin/usbprobe

+ 0 - 59
386/bin/usb/usbfat:

@@ -1,59 +0,0 @@
-#!/bin/rc
-# usbfat: [disk [mtpt]] - mount a USB disk's MS FAT file system
-rfork e
-disk = ()
-mtpt = /n/usb
-
-test -e /dev/usb || bind -a '#u' /dev || {
-	echo no '#u/usb' >[1=2]
-	exit nousb
-}
-test -e /dev/usbdctl || mount -a /srv/usb /dev || {
-	echo cannot mount /srv/usb >[1=2]
-	exit nousbd
-}
-
-disks=()
-mtpt=()
-switch ($#*) {
-case 0
-	;
-case 1
-	disks = $1
-case 2
-	disks = $1
-	mtpt = $2
-case *
-	echo usage: $0 ' [disk [mtpt]]' >[1=2]
-	exit usage
-}
-
-if (~ $#disks 0){
-	if(! test -e /dev/sdU*/data){
-		echo no usb disks >[1=2]
-		exit nodisk
-	}
-	disks = `{echo /dev/sdU*/data}
-}
-for(d in $disks){
-	if(~ $d sdU*.[0-9]*)
-		d=/dev/$d/data
-	if(test -e $d){
-		name=`{echo $d | sed 's/.*(sdU[0-9]+\.[0-9]+).*/\1/'}
-		if(~ $#mtpt 0)
-			mnt=/n/$name
-		if not
-			mnt=$mtpt
-		# don't mount it if it seems to be already mounted.
-		if(! test -e $mnt/*)
-		if(grep -s geometry /dev/$name/ctl){
-			blk = `{disk/fdisk -p $d | awk '/^part dos / {print $3}'}
-			if (! ~ $#blk 0 &&  ~ $blk [0-9]*)
-				d=$d:$blk
-			mount -c <{dossrv -sf $d >[2]/dev/null} $mnt && echo $mnt
-		}
-	}
-	if not
-		echo $d does not exist
-}
-exit ''

+ 0 - 0
386/bin/usb/probe → rc/bin/usbprobe