From d75f5a24baa73052dd174fbd84a9615db4551b73 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 10 Dec 2014 03:16:36 +0100 Subject: [PATCH 1/3] bootrc: preserve #ec/fs (thanks _sl) --- sys/src/9/boot/bootrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/9/boot/bootrc b/sys/src/9/boot/bootrc index d3046727a..ed949ec91 100755 --- a/sys/src/9/boot/bootrc +++ b/sys/src/9/boot/bootrc @@ -145,7 +145,7 @@ fn main{ } # remove enviroment variables - rm -f /env/^$mt /env/? /env/?? '/env/fn#'* + rm -f '#e/'^$mt '#e/'? '#e/'?? '#e/fn#'* # remove part of our temporary root /mnt/broot/$cputype/bin/unmount /$cputype/bin /bin From 23b3407663fd2f312760e4ce21443bf4c9e10f5f Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 10 Dec 2014 03:22:14 +0100 Subject: [PATCH 2/3] bootrc: add ndb/dnsgetip resolver to bootfs so domain names can be used for fs=, auth= and secstore= (thanks mischief) --- sys/src/9/boot/net.rc | 7 +++++++ sys/src/9/port/bootfs.proto | 2 ++ 2 files changed, 9 insertions(+) diff --git a/sys/src/9/boot/net.rc b/sys/src/9/boot/net.rc index 63697d8ff..42ba9f19e 100755 --- a/sys/src/9/boot/net.rc +++ b/sys/src/9/boot/net.rc @@ -25,6 +25,13 @@ fn confignet{ 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 diff --git a/sys/src/9/port/bootfs.proto b/sys/src/9/port/bootfs.proto index 956601c01..535265e71 100644 --- a/sys/src/9/port/bootfs.proto +++ b/sys/src/9/port/bootfs.proto @@ -27,6 +27,8 @@ $objtype mntgen mount mv + ndb + dnsgetip hjfs rc rm From ba6cd374129451305421703aeee6a007cb8ac977 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 10 Dec 2014 03:22:59 +0100 Subject: [PATCH 3/3] bootfs: remove disk/kfs fileserver, nobody uses it --- sys/src/9/port/bootfs.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/src/9/port/bootfs.proto b/sys/src/9/port/bootfs.proto index 535265e71..33df1759f 100644 --- a/sys/src/9/port/bootfs.proto +++ b/sys/src/9/port/bootfs.proto @@ -14,7 +14,6 @@ $objtype dd disk fdisk - kfs prep dossrv echo