granter role no-op deletes the dead bootstrap token
This commit is contained in:
parent
59456c3c58
commit
31670da795
1 changed files with 7 additions and 3 deletions
|
|
@ -1125,8 +1125,10 @@ let
|
|||
noop = "granter role already in place; bootstrap token not needed";
|
||||
del = "rm -f /run/secrets/bao-bootstrap.token";
|
||||
before = lib.head (lib.splitString "refused the bootstrap token" g);
|
||||
noopBranch = lib.head (lib.splitString "exit 0" (lib.last (lib.splitString noop g)));
|
||||
in
|
||||
lib.hasInfix noop before
|
||||
&& lib.hasInfix del noopBranch
|
||||
&& lib.hasInfix "bao login -method=cert -token-only" before
|
||||
&& lib.hasInfix "BAO_CLIENT_CERT=" before
|
||||
&& lib.hasInfix del g
|
||||
|
|
|
|||
Loading…
Reference in a new issue