43 lines · 704 B · Text
RawDownload
#!/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 'aux/listen1 -tv tcp!*!'^$port^' /rc/bin/service/tcp17019 &' >>/n/h/io0chmod 660 /srv/bootchgrp -o $username /srv/boot