9fs: add 9fat, remove venti/vac

This commit is contained in:
stanley lieber 2011-04-22 20:14:08 +00:00
parent c693f26b2c
commit 609e1466c5

View file

@ -6,6 +6,22 @@ switch($1){
case ''
echo usage: 9fs service '[mountpoint]' >[1=2]
exit usage
case 9fat
part=`{ls /dev/fs/9fat /dev/sd*/9fat >[2]/dev/null}
if(~ $#part 0) {
echo 'no 9fat partition found' >[1=2]
exit no.9fat
}
part=$part(1)
if(! test -f /srv/dos)
dossrv >/dev/null </dev/null >[2]/dev/null
unmount /n/9fat >/dev/null >[2]/dev/null
mount -c /srv/dos /n/9fat $part
unmount /n/9 >/dev/null >[2]/dev/null
mount -c /srv/dos /n/9 $part
case kfs
if(! test -f /srv/kfs)
disk/kfs
@ -28,21 +44,6 @@ case sourcesdump
case sourcessnap
9fs sources
mount -n /srv/sources /n/sourcessnap main/snapshot
# arbitrary venti archives
case vac:*
vacfs <{echo $1}
case *.vac
if (test -e $1)
score=$1
if not if (! ~ $1 /* && test -e $home/lib/vac/$1)
score=$home/lib/vac/$1
if not if (! ~ $1 /* && test -e /lib/vac/$1)
score=/lib/vac/$1
if not {
echo $0: $1: no such score file >[1=2]
exit 'no score file'
}
vacfs -m /n/`{basename $1 .vac} `{cat $score}
case wiki
srv -m 'net!plan9.bell-labs.com!wiki' wiki /mnt/wiki
case *