summaryrefslogtreecommitdiff
path: root/rc/bin/inst/nvramsetup
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@centraldogma>2011-06-09 20:31:04 +0000
committercinap_lenrek <cinap_lenrek@centraldogma>2011-06-09 20:31:04 +0000
commite27c2203ef8f4801c7515a5eef08327a2e85d946 (patch)
tree96b0c75f77fb1b9c676924cf475ab95da642c96a /rc/bin/inst/nvramsetup
parent474df964241d6c844237a9625eae904ac61aedc4 (diff)
downloadplan9front-e27c2203ef8f4801c7515a5eef08327a2e85d946.tar.xz
ask for nvram and 9fat partitions
Diffstat (limited to 'rc/bin/inst/nvramsetup')
-rwxr-xr-xrc/bin/inst/nvramsetup47
1 files changed, 47 insertions, 0 deletions
diff --git a/rc/bin/inst/nvramsetup b/rc/bin/inst/nvramsetup
new file mode 100755
index 000000000..26b433d07
--- /dev/null
+++ b/rc/bin/inst/nvramsetup
@@ -0,0 +1,47 @@
+#!/bin/rc
+
+# desc: invalidate nvram
+# prereq: systype copydist
+
+files=(/dev/sd*/nvram)
+
+switch($1){
+case checkdone checkready
+ if(~ $#files 0 && ! ~ $syst cpu)
+ nvramsetup=done
+ if not {
+ if(~ $#nvram 1 && grep -s trust $nvram)
+ nvramsetup=done
+ if not
+ nvramsetup=ready
+ }
+ export nvramsetup
+
+case go
+ echo
+ echo 'Setup Plan 9 NVRAM configuration partition (nvram)'
+ echo
+
+ if(~ $#files 1)
+ default=(-d $files)
+ if not
+ default=()
+ prompt $default 'Nvram partition' $files
+ nvram=$rd
+ export nvram
+
+ echo 'trust, but verify' >$nvram
+
+ if(! ~ $syst cpu)
+ exit
+
+ 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. On an auth server,'
+ echo 'the password will be used to encrypt the user database'
+ echo '/adm/keys'
+ echo
+}