#!/bin/rc
rfork e
echo -n evo...
fn ipq { # attr val rattr
ndb/ipquery $* | sed 's/^[a-z0-9]+=//'
}
myeth=`{cat /net/ether?/addr}
mev4=`{ndb/query -f /lib/ndb/local ether $myeth ip}
if (~ $#mev4 0 || ~ $mev4 '')
mev4=`{ndb/query sys $sysname ip}
if (~ $#mev4 0 || ~ $mev4 '')
status='' # ip/ipconfig
if not {
ip=`{ipq sys $sysname ip}
ipnet=`{ipq sys $sysname ipnet}
ipmask=`{ipq ipnet $ipnet ipmask}
ipgw=`{ipq ipnet $ipnet ipgw}
ip/ipconfig -g $ipgw $ip $ipmask
}
TIMESYNCARGS=(-nla1000000)
dmaon
aux/timesync -rL
@{sleep 5; . <{kill timesync}; aux/timesync $TIMESYNCARGS} &
echo 55 > /dev/volume
|