case ''
echo usage: 9fs service '[mountpoint]' >[1=2]
exit usage
-case 9fat
- part=`{ls /dev/fs/9fat /dev/sd*/9fat >[2]/dev/null}
+case 9fat esp pidos dos
+ if(~ $#2 1)
+ part=`{ls $2 >[2]/dev/null}
+ if not if(~ $1 pidos)
+ part=`{ls /dev/sdM*/dos >[2]/dev/null}
+ if not
+ part=`{ls /dev/fs/$1 /dev/sd*/$1 >[2]/dev/null}
if(~ $#part 0) {
- echo 'no 9fat partition found' >[1=2]
- exit no.9fat
+ echo 'no '$1' partition found' >[1=2]
+ exit no.$1
}
-
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
+ unmount /n/$1 >/dev/null >[2]/dev/null
+ mount -c /srv/dos /n/$1 $part
+ if(~ $1 9fat){
+ unmount /n/9 >/dev/null >[2]/dev/null
+ mount -c /srv/dos /n/9 $part
+ }
case kfs
if(! test -f /srv/kfs)
disk/kfs
case juke # ye olde file server
srv -q il!jukefs && mount /srv/il!jukefs /n/juke
case sources
- srv -nq tcp!sources.cs.bell-labs.com sources /n/sources
+ srv -nqC tcp!sources.cs.bell-labs.com sources /n/sources
case sourcesdump
9fs sources
- mount -n /srv/sources /n/sourcesdump main/archive
+ mount -nC /srv/sources /n/sourcesdump main/archive
case sourcessnap
9fs sources
- mount -n /srv/sources /n/sourcessnap main/snapshot
+ mount -nC /srv/sources /n/sourcessnap main/snapshot
+case atom
+ srv -nq tcp!atom.9atom.org atom && mount -nC /srv/atom /n/atom atom
+case atomdump
+ 9fs atom && mount -nC /srv/atom /n/atomdump atomdump
+# 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 ingenic
+ ftpfs -qKm /n/ingenic -a $user@$sysname ftp.ingenic.com
+case kernel
+ ftpfs -qKm /n/kernel -a $user@sysname ftp.kernel.org
+case qrstuv
+ srv -nqmC tcp!fs.9paste.net qrstuv
case *
switch($#*){
case 1