kernel: add /rc to devroot

This makes it much easier to run a rc
program without needing to bind in all of '#s/boot'.
This commit is contained in:
Jacob Moody 2022-05-28 02:31:26 +00:00 committed by xfnw
parent 96d07474b8
commit 9fe925eaa5
4 changed files with 4 additions and 0 deletions

View file

@ -22,6 +22,7 @@ mount -a /srv/mntexport /mnt/exportfs
# standard bin
bind /$cputype/bin /bin
bind $rootdir'/rc' /rc
bind -a /rc/bin /bin
# internal networks

View file

@ -10,6 +10,7 @@ root \- the root file system
.B /net
.B /net.alt
.B /proc
.B /rc
.B /root
.B /srv
.fi

View file

@ -25,6 +25,7 @@ main(int, char *argv[])
buf[1+read(open("/env/cputype", OREAD|OCEXEC), buf+1, sizeof buf - 6)] = '\0';
strcat(buf, bin);
bind(buf, bin, MAFTER);
bind("/root/rc", "/rc", MREPL);
bind("/rc/bin", bin, MAFTER);
exec("/bin/bootrc", argv);

View file

@ -105,6 +105,7 @@ rootreset(void)
addrootdir("net");
addrootdir("net.alt");
addrootdir("proc");
addrootdir("rc");
addrootdir("root");
addrootdir("srv");
addrootdir("shr");