#!/bin/rc# dials a storage server to acquire a root and begins services within it rforkport=20019dialstring=tcp!containertest!10564hubname=inithubusername=$user while(~ $1 -*){ switch($1){ case -p port=$2 shift case -d dialstring=$2 shift case -h hubname=$2 shift case -u username=$2 shift } shift} rfork Vsrv $dialstring bootif(! test -e /srv/boot){ echo unable to srv $dialstring to boot >[1=2] exit no.boot}hub -b -z $hubname#sleep 1mount /zrv/$hubname /n/hecho 'auth/newns' >>/n/h/io0#sleep 1cat /bin/startsrvs >>/n/h/io0#sleep 1echo '/tmp/listen1 -tv tcp!*!'^$port^' /rc/bin/service/tcp17019 &' >>/n/h/io0chmod 660 /srv/bootchgrp -o $username /srv/boot
#!/bin/rc
# dials a storage server to acquire a root and begins services within it
rfork
port=20019
dialstring=tcp!containertest!10564
hubname=inithub
username=$user
while(~ $1 -*){
switch($1){
case -p
port=$2
shift
case -d
dialstring=$2
shift
case -h
hubname=$2
shift
case -u
username=$2
shift
}
shift
}
rfork V
srv $dialstring boot
if(! test -e /srv/boot){
echo unable to srv $dialstring to boot >[1=2]
exit no.boot
}
hub -b -z $hubname
#sleep 1
mount /zrv/$hubname /n/h
echo 'auth/newns' >>/n/h/io0
#sleep 1
cat /bin/startsrvs >>/n/h/io0
#sleep 1
echo '/tmp/listen1 -tv tcp!*!'^$port^' /rc/bin/service/tcp17019 &' >>/n/h/io0
chmod 660 /srv/boot
chgrp -o $username /srv/boot