boot(8): add cfs support
This commit is contained in:
parent
21ede7960f
commit
cde40efb0c
3 changed files with 19 additions and 3 deletions
|
@ -8,7 +8,7 @@ bind -q '#p' /proc
|
||||||
for(i in S f k æ t)
|
for(i in S f k æ t)
|
||||||
bind -a '#'^$i /dev >/dev/null >[2=1]
|
bind -a '#'^$i /dev >/dev/null >[2=1]
|
||||||
|
|
||||||
for(i in init sysname user nvram rootdir bootdisk bootargs \
|
for(i in init sysname user nvram rootdir cfs bootdisk bootargs \
|
||||||
nobootprompt debugfactotum \
|
nobootprompt debugfactotum \
|
||||||
fs fsaddr auth authaddr){
|
fs fsaddr auth authaddr){
|
||||||
a=$$i
|
a=$$i
|
||||||
|
@ -93,6 +93,20 @@ fn main{
|
||||||
# connect method
|
# connect method
|
||||||
$mp(2) $ma
|
$mp(2) $ma
|
||||||
|
|
||||||
|
# insert cfs in the pipeline
|
||||||
|
if(test -x /bin/cfs){
|
||||||
|
if(~ $#bootdisk 1 && ~ $#cfs 0)
|
||||||
|
cfs=$bootdisk/cache
|
||||||
|
if(~ $#cfs 1 && ! ~ $cfs off && test -f $cfs){
|
||||||
|
x=(/bin/cfs -s -f $cfs)
|
||||||
|
if(~ -f $ff)
|
||||||
|
x=($x -r)
|
||||||
|
{$x </srv/boot &} | echo 0 >/srv/cfs
|
||||||
|
rm /srv/boot
|
||||||
|
mv /srv/cfs /srv/boot
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# mount and change root in new enviroment and namespace
|
# mount and change root in new enviroment and namespace
|
||||||
rfork ne
|
rfork ne
|
||||||
|
|
||||||
|
@ -182,5 +196,5 @@ while(){
|
||||||
# cleanup so it can be restarted
|
# cleanup so it can be restarted
|
||||||
nobootprompt=()
|
nobootprompt=()
|
||||||
user=()
|
user=()
|
||||||
rm -f /srv/boot /srv/slashn /srv/cs /srv/dns
|
rm -f /srv/cfs /srv/boot /srv/slashn /srv/cs /srv/dns
|
||||||
} </dev/cons >/dev/cons >[2]/dev/cons
|
} </dev/cons >/dev/cons >[2]/dev/cons
|
||||||
|
|
|
@ -6,6 +6,7 @@ $cputype
|
||||||
kbdfs
|
kbdfs
|
||||||
bind
|
bind
|
||||||
cat
|
cat
|
||||||
|
cfs
|
||||||
cryptsetup
|
cryptsetup
|
||||||
dd
|
dd
|
||||||
disk
|
disk
|
||||||
|
@ -22,6 +23,7 @@ $cputype
|
||||||
mkdir
|
mkdir
|
||||||
mntgen
|
mntgen
|
||||||
mount
|
mount
|
||||||
|
mv
|
||||||
rc
|
rc
|
||||||
rm
|
rm
|
||||||
sed
|
sed
|
||||||
|
|
|
@ -98,7 +98,7 @@ bootfs.paq: ../port/bootfs.proto
|
||||||
disk/mkfs -s / -d bootfs ../port/bootfs.proto
|
disk/mkfs -s / -d bootfs ../port/bootfs.proto
|
||||||
@{
|
@{
|
||||||
cd bootfs/$objtype/bin
|
cd bootfs/$objtype/bin
|
||||||
strip * */* >[2]/dev/null || status=''
|
strip * */* */*/* >[2]/dev/null || status=''
|
||||||
}
|
}
|
||||||
mkpaqfs -o $target bootfs
|
mkpaqfs -o $target bootfs
|
||||||
rm -rf bootfs
|
rm -rf bootfs
|
||||||
|
|
Loading…
Reference in a new issue