ref: a4be2bfea7af6d18675d5806b979c67c4bd5a9db
parent: 0b75bedf3c015cdc8aea0418b9fcddc50b659ca8
author: stanley lieber <stanley.lieber@gmail.com>
date: Tue Apr 19 23:49:58 EDT 2011
add Fish-'s installer patches; possibly not in a working state. testing/fixes requested.
--- a/rc/bin/fshalt
+++ b/rc/bin/fshalt
@@ -27,6 +27,7 @@
f=`{ls /srv/fscons*>[2]/dev/null} k=`{ls /srv/kfs*cmd >[2]/dev/null|sort -r}+c=`{ls /srv/cwfs*cmd >[2]/dev/null}echo -n syncing...
for(i in $f) @ {@@ -55,6 +56,12 @@
case *
disk/kfscmd -n `{echo $i | sed -n 's%/srv/kfs.(.*).cmd%\1%p'} sync}
+ sleep 2
+}
+
+for (i in $c){+ echo -n $i...
+ echo halt >>$i
sleep 2
}
--- a/rc/bin/inst/bootsetup
+++ b/rc/bin/inst/bootsetup
@@ -22,7 +22,7 @@
if(! test -f /tmp/plan9.ini) { { sfs=`{echo $fs | sed 's;/dev;#S;'}- if(~ $fstype fossil fossil+venti){+ if(~ $fstype fossil cwfs){echo bootfile'='$bootfat!9pcf
echo 'bootargs=local!'^$sfs
echo 'bootdisk=local!'^$sfs
--- a/rc/bin/inst/configfs
+++ b/rc/bin/inst/configfs
@@ -4,7 +4,7 @@
switch($1){case checkdone
- if(! ~ $fstype fossil fossil+venti){+ if(! ~ $fstype cwfs){configfs=ready
export configfs
}
@@ -12,10 +12,9 @@
case go
echo 'You can install the following types of file systems:'
echo
- echo ' fossil the new Plan9 fileserver'
- echo ' fossil+venti fossil + a archival dump server'
+ echo ' cwfs the cached-worm file server'
echo
- prompt -d fossil 'File system' fossil fossil+venti
+ prompt -d fossil 'File system' cwfs
fstype=$rd
export fstype
}
--- a/rc/bin/inst/halt
+++ b/rc/bin/inst/halt
@@ -2,12 +2,8 @@
echo -n 'Halting file systems...'
-if(ps | grep -s ' venti$')
- venti/sync -h tcp!127.0.0.1!17034
-if(ps | grep -s ' fossil$'){- echo fsys all halt >>/srv/fscons
- slay fossil|rc
-}
+if(ps | grep -s ' cwfs$')
+ echo halt >>/srv/cwfs.cmd
echo done
echo
--- a/rc/bin/inst/mountfs
+++ b/rc/bin/inst/mountfs
@@ -4,8 +4,8 @@
# prereq: configfs
switch($fstype){-case fossil fossil+venti
- exec mountfossil $*
+case cwfs
+ exec mountcwfs $*
case *
mountfs=notdone
export mountfs
--- a/rc/bin/inst/prepdisk
+++ b/rc/bin/inst/prepdisk
@@ -4,10 +4,8 @@
# prereq: partdisk
fn autotype {- if(~ $fstype fossil)
- echo -a 9fat -a nvram -a fossil -a swap
- if(~ $fstype fossil+venti)
- echo -a 9fat -a nvram -a arenas -a isect -a fossil -a swap # -a other
+ if(~ $fstype cwfs)
+ echo -a 9fat -a nvram -a fscache -a fsworm -a other
}
switch($1) {@@ -47,15 +45,10 @@
if(! ~ $prepdisk ready){prepdisk=done
switch($fstype){- case fossil
- if(! test -f /dev/sd*/fossil* && ! test -f /dev/fs/fossil*)
+ case cwfs
+ if(! test -f /dev/sd*/fscache* && ! test -f /dev/fs/fscache*)
prepdisk=ready
- case fossil+venti
- if(! test -f /dev/sd*/fossil* && ! test -f /dev/fs/fossil*)
- prepdisk=ready
- if(! test -f /dev/sd*/arenas && ! test -f /dev/fs/arenas*)
- prepdisk=ready
- if(! test -f /dev/sd*/isect && ! test -f /dev/fs/isect*)
+ if(! test -f /dev/sd*/fsworm* && ! test -f /dev/fs/fsworm*)
prepdisk=ready
}
}
--- a/sys/src/cmd/disk/prep/prep.c
+++ b/sys/src/cmd/disk/prep/prep.c
@@ -80,6 +80,9 @@
{ "other", 200*MB, 0, 4, }, { "swap", 100*MB, 512*MB, 1, }, { "cache", 50*MB, 1*GB, 2, },+
+ { "fscache", 200*MB, 0, 4, },+ { "fsworm", 500*MB, 0, 20, },};
void
--
⑨