2011-05-04 18:55:08 +00:00
|
|
|
#!/bin/rc
|
|
|
|
|
2011-06-09 04:56:16 +00:00
|
|
|
# desc: invalidate nvram
|
2011-05-04 18:55:08 +00:00
|
|
|
# prereq: systype copydist
|
|
|
|
|
2011-06-09 04:56:16 +00:00
|
|
|
nvram=(/dev/sd*/nvram)
|
2011-06-09 05:26:17 +00:00
|
|
|
nvram=$nvram(1)
|
2011-05-04 18:55:08 +00:00
|
|
|
|
2011-06-09 05:26:17 +00:00
|
|
|
switch($1){
|
2011-05-04 18:55:08 +00:00
|
|
|
case go
|
|
|
|
echo
|
2011-06-09 04:56:16 +00:00
|
|
|
echo 'Invalidate nvram'
|
2011-05-04 18:55:08 +00:00
|
|
|
echo
|
|
|
|
|
2011-06-09 04:56:16 +00:00
|
|
|
echo 'trust, but verify' >$nvram
|
2011-05-04 18:55:08 +00:00
|
|
|
|
|
|
|
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'
|
2011-06-09 04:56:16 +00:00
|
|
|
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'
|
2011-05-04 18:55:08 +00:00
|
|
|
echo
|
|
|
|
|
|
|
|
authsetup=done
|
|
|
|
export authsetup
|
2011-06-09 04:56:16 +00:00
|
|
|
case checkdone
|
|
|
|
if(~ $syst cpu && test -w $nvram && ! grep -s trust $nvram){
|
|
|
|
authsetup=ready
|
|
|
|
export authsetup
|
|
|
|
}
|
2011-05-04 18:55:08 +00:00
|
|
|
}
|