#!/bin/rc
# mount a fileserver without auth and use its binaries, lib, and sys

if (! ~ $1 ?*){
	echo usage: addroroot TARGETSYSTEM
	exit usage
}
if(! test -e /srv/$1){
	srv tcp!$1!564 $1
}
mount -n /srv/$1 /n/$1
bind -a /n/$1/ /
bind -b /n/$1/$cputype/bin /bin
bind -b /n/$1/rc/bin /bin
bind -b /n/$1/lib /lib
bind -b /n/$1/sys /sys
exit ''