Blob
1 #!/usr/local/plan9/bin/rc3 if(! ~ $#* 2){4 echo 'usage: mount addr mtpt' >[1=2]5 exit usage6 }7 switch(`{uname}){8 case Linux9 if(lsmod|9 grep -si '^9p(2000)? '){10 if(test -S $1)11 exec mount -t 9P -o proto'='unix,name'='$USER $1 $212 exec mount -t 9P -o proto'='tcp,name'='$USER $1 $213 }14 if(lsmod|9 grep -si '^fuse ')15 exec 9pfuse $1 $216 echo 'don''t know how to mount (no 9p, no fuse)' >[1=2]17 case FreeBSD18 if(kldstat|9 grep -si ' fuse')19 exec 9pfuse $1 $220 echo 'don''t know how to mount (no fuse)' >[1=2]21 case *22 echo 'can''t mount on' `{uname} >[1=2]23 }24 exit nomount