ref: 90bb50974edfafa3194b0c3124a13229ffeec9ee
parent: 3e2edc839815aac6344bc3b6768239757b98d581
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Dec 9 22:22:14 EST 2014
bootrc: add ndb/dnsgetip resolver to bootfs so domain names can be used for fs=, auth= and secstore= (thanks mischief)
--- a/sys/src/9/boot/net.rc
+++ b/sys/src/9/boot/net.rc
@@ -25,6 +25,13 @@
if(~ $#auth 0)
ask auth ' ip is? ' $fs(1)
+ # resolve dns names
+ if(test -x /bin/ndb/dnsgetip){+ for(i in fs auth secstore){+ $i=`{for(x in $$i) ndb/dnsgetip -a $x}+ }
+ }
+
# set bootstrap authservers for factotum
if(! ~ $#auth 0){grep -v '^[ ]*auth=' /net/ndb >/env/x
--- a/sys/src/9/port/bootfs.proto
+++ b/sys/src/9/port/bootfs.proto
@@ -27,6 +27,8 @@
mntgen
mount
mv
+ ndb
+ dnsgetip
hjfs
rc
rm
--
⑨