diff options
author | stanley lieber <stanley.lieber@gmail.com> | 2011-05-04 18:55:08 +0000 |
---|---|---|
committer | stanley lieber <stanley.lieber@gmail.com> | 2011-05-04 18:55:08 +0000 |
commit | 0461c5843310c5c51bf43b0835f180492e32f579 (patch) | |
tree | f26f48abfbde223adc9630d9becba10aa6f1f7b9 /rc/bin/inst | |
parent | e9a55e0333d2da1f0f3a129310cf210684590494 (diff) |
add cpu server to the installer; add more files for cpu server; make sure they are included on the cd-rom.
Diffstat (limited to 'rc/bin/inst')
-rwxr-xr-x | rc/bin/inst/authsetup | 36 | ||||
-rwxr-xr-x | rc/bin/inst/bootsetup | 10 | ||||
-rwxr-xr-x | rc/bin/inst/main | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | rc/bin/inst/mountcwfs | 18 | ||||
-rwxr-xr-x | rc/bin/inst/systype | 23 |
5 files changed, 82 insertions, 7 deletions
diff --git a/rc/bin/inst/authsetup b/rc/bin/inst/authsetup new file mode 100755 index 000000000..dc23e73b3 --- /dev/null +++ b/rc/bin/inst/authsetup @@ -0,0 +1,36 @@ +#!/bin/rc + +# desc: set system password for auth, invalidate nvram +# prereq: systype copydist + +nvram=`{echo `{basename -d $fs}^/nvram} + +switch($1) { +case checkdone + if(! ~ $syst cpu || ! grep trust $nvram){ + authsetup=ready + export authsetup + } +case go + echo + echo 'Setup keyfs and provide a password for the machine' + echo + + auth/keyfs + + if(! grep trust $nvram) + echo 'trust, but verify' >$nvram >[2=1] + + echo + echo 'You will be asked to enter an authid, authdom, secstore key,' + echo 'and password upon next boot. The authid is the hostowner.' + echo 'The authdom is the domain from your network configuration.' + echo 'The secstore key and password should be a secret password' + echo 'of eight characters or greater in length. Remember the' + echo 'password, you will need to use it again when creating the' + echo 'bootes user on the auth server.' + echo + + authsetup=done + export authsetup +} diff --git a/rc/bin/inst/bootsetup b/rc/bin/inst/bootsetup index 9e5c71d46..7de697850 100755 --- a/rc/bin/inst/bootsetup +++ b/rc/bin/inst/bootsetup @@ -1,7 +1,7 @@ #!/bin/rc # desc: create a boot floppy or configure hard disk to boot plan 9 -# prereq: copydist +# prereq: systype copydist switch($1) { case go @@ -18,9 +18,14 @@ case go } if(! test -f /tmp/plan9.ini) { + if(~ $syst cpu) + bootfile=9pccpuf + if not + bootfile=9pcf { - echo 'bootfile=9pcf' + echo 'bootfile='^$bootfile echo 'bootargs=local!'^$fs + echo 'sysname=cirno' echo 'mouseport='^$mouseport echo 'monitor='^$monitor echo 'vgasize='^$vgasize @@ -47,6 +52,7 @@ case go logprog cp /tmp/plan9.ini /n/9fat/plan9.ini logprog cp /n/newfs/386/9bootfat /n/9fat/9bootfat logprog cp /n/newfs/386/9pcf /n/9fat/9pcf + logprog cp /n/newfs/386/9pccpuf /n/9fat/9pccpuf echo echo 'There are myriad ways to boot a Plan 9 system.' diff --git a/rc/bin/inst/main b/rc/bin/inst/main index ce09cc2d7..bd974658b 100755 --- a/rc/bin/inst/main +++ b/rc/bin/inst/main @@ -12,6 +12,7 @@ echo -n 'Preparing menu...' # must be topologically sorted (by prereq) tasks=(\ + systype\ configfs\ partdisk prepdisk\ mountfs\ @@ -20,6 +21,7 @@ tasks=(\ mountdist\ download\ copydist\ + authsetup\ bootsetup finish stop\ stopether stopppp\ ) diff --git a/rc/bin/inst/mountcwfs b/rc/bin/inst/mountcwfs index 3af4486d4..2c1416f3a 100644..100755 --- a/rc/bin/inst/mountcwfs +++ b/rc/bin/inst/mountcwfs @@ -1,6 +1,7 @@ #!/bin/rc # desc: choose and mount file system partition +# prereq: systype switch($1){ case go @@ -61,8 +62,10 @@ case go echo service cwfs echo config $fs - # new config option - echo noauth + if(! ~ $syst cpu){ + # new config option + echo noauth + } echo filsys main c'('$fs')('$fsworm')' echo filsys dump o @@ -97,18 +100,23 @@ case go echo cfs main echo create /adm adm adm 775 d echo create /adm/users adm adm 664 - echo create /usr sys sys 775 d echo create /dist sys sys 775 d + echo create /usr sys sys 775 d + echo newuser adm +bootes + echo newuser sys +bootes + echo newuser upas +bootes echo newuser $user - echo newuser sys +$user echo newuser adm +$user + echo newuser sys +$user echo newuser upas +$user if(! ~ $fsother ''){ echo cfs other + echo create /dist sys sys 775 d echo create /usr sys sys 775 d + echo create /usr/bootes bootes bootes 775 d + echo create /usr/bootes/tmp bootes bootes 750 d echo create /usr/$user $user $user 775 d echo create /usr/$user/tmp $user $user 750 d - echo create /dist sys sys 775 d echo cfs main } } >>/srv/cwfs.cmd diff --git a/rc/bin/inst/systype b/rc/bin/inst/systype new file mode 100755 index 000000000..ab4e53a25 --- /dev/null +++ b/rc/bin/inst/systype @@ -0,0 +1,23 @@ +#!/bin/rc + +# desc: choose system type + +switch($1){ +case checkdone + if(~ $#syst 1 && ~ $syst cpu terminal) + systype=done + if not + systype=ready + export systype + if(~ $syst terminal) + tasks=`{echo $tasks | sed 's/authsetup//g'} + export tasks +case go + echo + + options=(terminal cpu) + + prompt -d terminal 'System type' $options + syst=$rd + export syst +} |