bootrc: do not pass authserver with -a flag to factotum, handle multiple secstore addresses
factotum is started in bootrc before the network is setup (as we need it to negotiate wpa key for wifi). once, the network is setup, the bootstrap authservers are passed in /net/ndb, which factotum reads when doing bootstrap authdial. it does this only when no authserver was specified earlier! but we want net.rc to select the proper bootstrap authserver... the $secstore variable takes precedence over $auth. as there is no connection server yet, we have to select the set of servers here and pass them to secstore with -s flag. note that this will work if multiple addresses where specified.
This commit is contained in:
parent
f9d379974a
commit
17566b4dd3
1 changed files with 5 additions and 5 deletions
|
@ -88,8 +88,6 @@ fn main{
|
|||
}
|
||||
if not
|
||||
x=($x -u)
|
||||
if(! ~ $#auth 0)
|
||||
x=($x -a $auth)
|
||||
if(! ~ $#debugfactotum 0)
|
||||
x=($x -p)
|
||||
must $x
|
||||
|
@ -98,9 +96,11 @@ fn main{
|
|||
# config method
|
||||
$mp(1) $ma
|
||||
|
||||
# load keys from secstore
|
||||
if(~ $#auth 1 && test -x /bin/auth/secstore && test -f /mnt/factotum/ctl){
|
||||
x=(auth/secstore -G factotum -s $auth)
|
||||
# load keys from secstore if $auth or $secstore is not empty
|
||||
x=secstore
|
||||
if(~ $#$x 0) x=auth
|
||||
if(! ~ $#$x 0 && test -x /bin/auth/secstore && test -f /mnt/factotum/ctl){
|
||||
x=(auth/secstore -G factotum -s^$$x)
|
||||
if(~ $service cpu)
|
||||
$x -n >/mnt/factotum/ctl
|
||||
if(~ $status *readnvram* || ! ~ $service cpu)
|
||||
|
|
Loading…
Reference in a new issue