shithub: ninethings

ref: f73081ef3c174a0a5988afd3ff5774f5313b7d81
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
}