#!/usr/local/plan9/bin/rc # # looking p9p related info. # path=($PLAN9/bin $PATH) echo 'checking variables ...' echo 'PLAN9' $PLAN9 echo 'checking 9pfuse works or not ...' ls /dev/*fuse* > /dev/null if(~ $status ?*) echo 'you need to install fuse' echo 'NAMESPACE' $NAMESPACE # typically NAMESPACE=/srv echo 'checking $PLAN9/ndb/local ...' echo ndb/local is used for authentication ls -l $PLAN9/ndb/local grep '^authdom=' $PLAN9/ndb/local echo 'checking variables that drawterm consulting ...' echo 'not required but make drawterm command simple if you have them.' echo 'cpu' $cpu echo 'auth' $auth echo 'drawterm by cinap requires IP value for cpu and auth' echo 'checking NAMESPACE if you have ...' ls -l $NAMESPACE echo 'checking factotum ...' ls -l /mnt/factotum echo 'your factotum keys are:' cat /mnt/factotum/ctl echo 'checking p9p processes that are used for mounting ...' ps -a | grep 'fact|/mount|9p' # NB: unix grep requires "-E" flag to handle '|' in pattern echo 'checking current p9p related mount points ...' u mount | grep '/mnt/|/n/' echo 'mount point for my servers:' for(d in `{ls /n}) ls $d | head -5|mc echo 'checking that mount point is really authenticated ...' me