diff options
| author | cinap_lenrek <cinap_lenrek@localhost> | 2011-04-14 17:41:48 +0000 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@localhost> | 2011-04-14 17:41:48 +0000 |
| commit | 715570c24e89cea414feb181be3aee65df1ceec5 (patch) | |
| tree | 9b1bd5bd20e6453144e2bdfb521841a54b726e1e /rc/bin/F000050 | |
| parent | a150899221a5badff9740703b754f901b4f52762 (diff) | |
| download | plan9front-715570c24e89cea414feb181be3aee65df1ceec5.tar.xz | |
remove crap, looks like import fuckup from iso
Diffstat (limited to 'rc/bin/F000050')
| -rwxr-xr-x | rc/bin/F000050 | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/rc/bin/F000050 b/rc/bin/F000050 deleted file mode 100755 index 07c8dc068..000000000 --- a/rc/bin/F000050 +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/rc -# usbfat: [disk [mtpt]] - mount a USB disk's MS FAT file system, -# which might be the only thing on the disk, or might be -# a partition within the disk. -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(~ `{ls /n/usb >[2]/dev/null | wc -l} 0) - mount /srv/usb /n/usb >[2]/dev/null -if (~ $#disks 0){ - disks = /dev/sdU*/data - if(! test -e $disks(1)){ - echo no usb disks >[1=2] - exit nodisk - } - disks = (/dev/sdU*/9fat /dev/sdXX/9fat /dev/sdU*/data /dev/sdXX/data) -} -for(d in $disks){ - if(! ~ $done yes) { - if(~ $d sdU*.[0-9]* sdXX*) - d=/dev/$d/data - if(test -e $d){ - name=`{echo $d | sed 's/.*(sd(XX|U[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/* && 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 - if (mount -c <{dossrv -sf $d >[2]/dev/null} $mnt) { - echo $mnt - done = yes - } - } - } - } -} -exit '' |
