shithub: ninethings

ref: 3e8831a56c04e4c464b42956a5e2211a67afda7b
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 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
}