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 # standard bin
bind /$cputype/bin /bin bind /$cputype/bin /bin
bind $rootdir'/rc' /rc
bind -a /rc/bin /bin bind -a /rc/bin /bin
# internal networks # internal networks

View file

@ -10,6 +10,7 @@ root \- the root file system
.B /net .B /net
.B /net.alt .B /net.alt
.B /proc .B /proc
.B /rc
.B /root .B /root
.B /srv .B /srv
.fi .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'; buf[1+read(open("/env/cputype", OREAD|OCEXEC), buf+1, sizeof buf - 6)] = '\0';
strcat(buf, bin); strcat(buf, bin);
bind(buf, bin, MAFTER); bind(buf, bin, MAFTER);
bind("/root/rc", "/rc", MREPL);
bind("/rc/bin", bin, MAFTER); bind("/rc/bin", bin, MAFTER);
exec("/bin/bootrc", argv); exec("/bin/bootrc", argv);

View file

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