shithub: ninethings

ref: 738c2a4659507ded3d87b13546cb21a6452490bb
dir: /martin/termrc.local/

View raw version
#!/bin/rc

nvram=/dev/sdN0/nvram
secstore=tcp!127.1!5356

if(! test -e >/srv/cs && ! test -e /net/cs)
	ndb/cs
sysname=`{cat /dev/sysname}

fn msg {
	echo '==>' $*
}

msg dumping fs...
echo dump >>/srv/hjfs.cmd
echo df >>/srv/hjfs.cmd

msg creating loopback...
ip/ipconfig loopback /dev/null 127.1

msg starting keyfs...
auth/keyfs -wp -m /mnt/keys /adm/keys

msg starting secstored...
auth/secstored -s tcp!127.1!5356
auth/factotum

msg setting up networking...
bind -a '#B' /net
bind -a '#l0' /net
bind -a '#l1' /net

9am/whi ether1

ethermultilink /net/ether1 /net/ether0 >/net/bridge0/ctl
ip/ipconfig -6 ether /net/ether1
ip/ipconfig -N ether /net/ether1 >[2]/dev/null || @{
	test -e /env/nora6 || ip/ipconfig ether /net/ether1 ra6 recvra 1 &
	ip/ipconfig -h $sysname ether /net/ether1 &
	wait
}