Repository navigation
feat: ROOT_PASS=KEEP keeps the password set before the first boot - #42
Merged
Merged
Conversation
An unattended first boot after pct create --password had to repeat the password in ROOT_PASS. setpass.py now takes --pass=KEEP, in any case, and keeps the password exactly when the screen would offer Keep, by the same keep_offer() check (build date, changed on or after it, usable, not the placeholder, not keel-init). Otherwise it prints an error naming ROOT_PASS=KEEP on stderr and exits 1, as other invalid preseeds do; KEEP is never set as the password and nothing is asked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An unattended first boot after
pct create --passwordhad to repeat the password in ROOT_PASS.ROOT_PASS=KEEP(any case) now keeps it.setpass.py --pass=KEEPis accepted exactly when the screen would offer Keep, through the samekeep_offer()(build date present, password usable and changed on or after it, not empty or the placeholder, not under keel-init). No logic is duplicated.Error: ROOT_PASS=KEEP: ...on stderr and exit 1, the convention offqdn.py/secalerts.pyfor an invalid preseed;runlogs the failed hook and goes on. KEEP is never set as the password and no screen is drawn. The shadow field is never printed.Test plan
pct create --password+ROOT_PASS=KEEPheadless first boot keeps the password.