summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2019-05-05 17:02:37 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2019-05-05 17:02:37 +0200
commitf22b4ecc77afe5ffb81560000fcacb9e3b1744f8 (patch)
tree00795242813e539268bc3ebbc033368551759b8e
parent75d44bc306ffcbaadaa18c161bf54071304510b0 (diff)
downloadplan9front-f22b4ecc77afe5ffb81560000fcacb9e3b1744f8.tar.xz
bootrc: fix $rootdir and $rootspec handling (thanks lucio)
we did not interpret the $rootdir and $rootspec environment variables right. $rootdir is what gets bound to / (usually /root) and $rootspec is the mountspec of /root.
-rwxr-xr-xsys/src/9/boot/bootrc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/9/boot/bootrc b/sys/src/9/boot/bootrc
index 27a8d80c1..36a71e38d 100755
--- a/sys/src/9/boot/bootrc
+++ b/sys/src/9/boot/bootrc
@@ -130,7 +130,7 @@ fn main{
# mount root filesystem
if(~ $#rootdir 0)
rootdir=/root
- must mount -c /srv/boot $rootdir
+ must mount -c '#s/boot' /root $rootspec
# compile init command
if(~ $#init 0){
@@ -151,7 +151,7 @@ fn main{
# create the name space, mount the root fs
/mnt/broot/$cputype/bin/bind / /
- /mnt/broot/$cputype/bin/mount -ac '#s/boot' /
+ /mnt/broot/$cputype/bin/bind -ac $rootdir /
# remove the remaining temporary root
/mnt/broot/$cputype/bin/unmount /mnt/broot