summaryrefslogtreecommitdiff
path: root/rc/bin/inst
diff options
context:
space:
mode:
Diffstat (limited to 'rc/bin/inst')
-rwxr-xr-xrc/bin/inst/bootsetup2
-rwxr-xr-xrc/bin/inst/configfs3
-rwxr-xr-xrc/bin/inst/mountcwfs2
-rwxr-xr-xrc/bin/inst/mountfs2
-rwxr-xr-xrc/bin/inst/mounthjfs70
-rwxr-xr-xrc/bin/inst/prepdisk2
-rwxr-xr-x[-rw-r--r--]rc/bin/inst/tzsetup0
7 files changed, 79 insertions, 2 deletions
diff --git a/rc/bin/inst/bootsetup b/rc/bin/inst/bootsetup
index 190d69ec7..f5d5c4aa5 100755
--- a/rc/bin/inst/bootsetup
+++ b/rc/bin/inst/bootsetup
@@ -37,7 +37,7 @@ case go
bootfile=9pcf
@{
echo 'bootfile='^$bootfile
- echo 'bootargs=local!'^$fs
+ echo 'bootargs=local!'^$fs^$fsflags
if(~ $#nvram 1)
echo 'nvram='^$nvram
echo 'mouseport='^$mouseport
diff --git a/rc/bin/inst/configfs b/rc/bin/inst/configfs
index a0eea4838..81fc37a3a 100755
--- a/rc/bin/inst/configfs
+++ b/rc/bin/inst/configfs
@@ -14,8 +14,9 @@ case go
echo 'You can install the following types of file systems:'
echo
echo ' cwfs64x the cached-worm file server'
+ echo ' hjfs the new 9front file server (experimental!)'
echo
- prompt -d cwfs64x 'File system' cwfs64x
+ prompt -d cwfs64x 'File system' cwfs64x hjfs
fstype=$rd
export fstype
}
diff --git a/rc/bin/inst/mountcwfs b/rc/bin/inst/mountcwfs
index b92abf9e2..2af0e7773 100755
--- a/rc/bin/inst/mountcwfs
+++ b/rc/bin/inst/mountcwfs
@@ -22,6 +22,8 @@ case go
prompt $default 'Cwfs cache partition' $files
fs=$rd
export fs
+ fsflags=
+ export fsflags
files=(`{ls /dev/sd*/fsworm* /dev/fs/fsworm* >[2]/dev/null})
if(! ~ $#files 0)
diff --git a/rc/bin/inst/mountfs b/rc/bin/inst/mountfs
index 4f73ba578..10d41bde7 100755
--- a/rc/bin/inst/mountfs
+++ b/rc/bin/inst/mountfs
@@ -6,6 +6,8 @@
switch($fstype){
case cwfs cwfs64 cwfs64x
exec mountcwfs $*
+case hjfs
+ exec mounthjfs $*
case *
mountfs=notdone
export mountfs
diff --git a/rc/bin/inst/mounthjfs b/rc/bin/inst/mounthjfs
new file mode 100755
index 000000000..6be5b4e6f
--- /dev/null
+++ b/rc/bin/inst/mounthjfs
@@ -0,0 +1,70 @@
+#!/bin/rc
+
+# desc: choose and mount file system partition
+# prereq: systype
+
+service=hjfs
+
+switch($1){
+case go
+ echo
+ echo The please choose your $fstype partition
+ echo
+
+ files=(`{ls /dev/sd*/fs* >[2]/dev/null})
+ if(! ~ $#files 0)
+ ls -l $files
+ echo
+ if(~ $#files 1)
+ default=(-d $files)
+ if not
+ default=()
+ prompt $default 'Hjfs partition' $files
+ fs=$rd
+ export fs
+
+ mem=`{awk ' $2 == "pagesize" { p = $1 } $2 == "user" { split($1, a, "/"); print int((a[2] * p / 4 + 1048575) / 1048576) } ' '#c'/swap}
+ prompt -d $mem 'Size of RAM filesystem cache (MB)?'
+ fsflags=(-m $rd)
+ export fsflags
+
+ log Starting $fstype file server for $fs
+ unmount /n/newfs >[2]/dev/null
+ echo halt >>/srv/$service.cmd >[2]/dev/null
+ rm -f /srv/$service /srv/$service.cmd
+
+ hjfs -n $service $fsflags -Srf $fs
+
+ log Configuring $fstype file server for $fs
+ {
+ echo echo on
+ echo create /dist sys sys 775 d
+ echo create /usr sys sys 775 d
+ echo newuser $user
+ echo newuser adm +$user
+ echo newuser sys +$user
+ echo newuser upas +$user
+ echo echo off
+ sleep 2
+ } >>/srv/$service.cmd
+
+ log Mounting $fstype file server for $fs
+ while(! logprog mount -c /srv/$service /n/newfs)
+ sleep 2
+ if(! ~ $fsother ''){
+ log Mounting $fstype file server for $fsother
+ logprog mount -c /srv/$service /n/other other
+ }
+
+case checkready checkdone
+ if(! ~ $fstype '' && ~ $#fs 1 && test -f $fs){
+ if(test -f /srv/$service && test -d /n/newfs/dist){
+ mountfs=done
+ export mountfs
+ exit
+ }
+ }
+ mountfs=ready
+ export mountfs
+ exit
+}
diff --git a/rc/bin/inst/prepdisk b/rc/bin/inst/prepdisk
index 359b93621..5427fc61e 100755
--- a/rc/bin/inst/prepdisk
+++ b/rc/bin/inst/prepdisk
@@ -7,6 +7,8 @@ fn autotype {
switch($fstype){
case cwfs cwfs64 cwfs64x
echo -a 9fat -a nvram -a fscache -a fsworm -a other
+ case hjfs
+ echo -a 9fat -a nvram -a fs
}
}
diff --git a/rc/bin/inst/tzsetup b/rc/bin/inst/tzsetup
index 92c06a45c..92c06a45c 100644..100755
--- a/rc/bin/inst/tzsetup
+++ b/rc/bin/inst/tzsetup