#!/bin/csh -f
#
# $1 = filsys, $2* = progname and args
# If $2 is empty, assume program name = filesystem name
#

if ($#argv < 1) then
   echo 'Usage: run filesystem [program [args]]'
   exit 1
endif
if ($#argv == 1) set argv = ($1 $1)
set filsys=$1:q
shift
set mountpoint=`attach -p $filsys:q`
if ( ! $status ) exec ${mountpoint:q}/${hosttype}bin/$*:q
