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
parent 53fbb05151
commit 774529e440
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");