ref: 9dde88f86b56e33227c85cfc4e46dcaa27e7405b
parent: 89cd4a0e67376d69d42a17bc3135ac9206c4e332
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Dec 23 09:41:52 EST 2022
bootrc: bind devcap and devtls, make /root mount consistent with spec
--- a/sys/src/9/boot/bootrc
+++ b/sys/src/9/boot/bootrc
@@ -8,12 +8,13 @@
bind /root /mnt/broot
unmount /root
-for(i in ¶ P S f æ t b m)
+for(i in ¤ ¶ P S f æ t b m)
bind -qa '#'^$i /dev
# bind in an ip interface
for(i in I l^(0 1 2 3))
bind -qa '#'$i /net
+bind -qa '#a' /net
# usually better than 1970
cat '#r/rtc' >/dev/time >[2]/dev/null
@@ -138,7 +139,7 @@
# mount root filesystem
if(~ $#rootdir 0)
rootdir=/root
- must mount -c '#s/boot' /root $rootspec
+ must mount /srv/boot /root $rootspec
# compile init command
if(~ $#init 0){
@@ -150,7 +151,7 @@
}
# remove enviroment variables
- rm -f '#e/'^$mt '#e/'? '#e/'?? '#e/fn#'*
+ rm -f /env/^$mt /env/? /env/?? '/env/fn#'*
# remove part of our temporary root
/mnt/broot/$cputype/bin/unmount /$cputype/bin /bin
@@ -158,8 +159,7 @@
/mnt/broot/$cputype/bin/unmount /
# create the name space, mount the root fs
- /mnt/broot/$cputype/bin/bind / /
- /mnt/broot/$cputype/bin/bind -ac $rootdir /
+ /mnt/broot/$cputype/bin/bind -a $rootdir /
# remove the remaining temporary root
/mnt/broot/$cputype/bin/unmount /mnt/broot