2005-03-18 19:27:26 +00:00
|
|
|
#!/usr/local/plan9/bin/rc
|
|
|
|
|
|
|
|
if(! ~ $#* 1){
|
|
|
|
echo 'usage: 9fs sysname'
|
|
|
|
exit usage
|
|
|
|
}
|
|
|
|
|
|
|
|
fn srv1 {
|
2007-11-27 20:39:06 +00:00
|
|
|
flag=()
|
|
|
|
if(~ $1 -*){
|
|
|
|
flag=$1
|
|
|
|
shift
|
|
|
|
}
|
2005-03-18 19:27:26 +00:00
|
|
|
if(! 9p stat $1 >/dev/null >[2=1]){
|
|
|
|
rm -f $ns/$1
|
2007-11-27 20:39:06 +00:00
|
|
|
srv $flag $2 $1
|
2005-03-18 19:27:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ns=`{namespace}
|
|
|
|
switch($1){
|
|
|
|
case tip
|
2007-11-27 20:39:06 +00:00
|
|
|
srv1 -a tip utumno.tip9ug.jp
|
2005-03-18 19:27:26 +00:00
|
|
|
case sources
|
2007-11-27 20:39:06 +00:00
|
|
|
srv1 -n sources sources.cs.bell-labs.com
|
2005-03-18 19:27:26 +00:00
|
|
|
case *
|
|
|
|
srv1 $1 $1
|
|
|
|
}
|
|
|
|
|