#!/bin/rc # ifup mtsfx etherno sysnm ndbfile svcdir - configure /net.$mtsfx # e.g., ifup alt 1 $sysname external service.alt # ifup gig 2 $sysname-gig local service # TODO: allow sharing a protocol stack between interfaces rfork e mtsfx=$1 etherno=$2 sysnm=$3 ndbfile=$4 svcdir=$5 mtpt=/net.^$mtsfx ndbf=/lib/ndb/^$ndbfile echo -n $mtpt... bind -b '#l'^$etherno $mtpt bind -b '#I'^$etherno $mtpt ipgw=dummy # in case ndb doesn't list one eval `{ndb/ipquery -f $ndbf sys $sysnm ip ipgw ipmask} ip/ipconfig -x .$mtsfx -g $ipgw ether $mtpt/ether$etherno $ip $ipmask ndb/cs -x $mtpt -f $ndbf ndb/dns -sx $mtpt -f $ndbf aux/listen -t /bin/service.auth -d /bin/^$svcdir $mtpt^/il aux/listen -t /bin/service.auth -d /bin/^$svcdir $mtpt^/tcp # ip/dhcpd -x $mtpt -f $ndbf # ip/rip -x $mtpt