mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 03:19:47 +03:00
pmb.config: Print ssh keys filenames that will be copied during init (MR 2251)
Make it clear to the user which SSH keys get copied to the device, and also link to the wiki page that tells the user how to change ssh_key_glob.
This commit is contained in:
parent
49fd496c94
commit
26f9d56b20
1 changed files with 9 additions and 2 deletions
|
@ -646,10 +646,17 @@ def ask_for_hostname(default: str | None, device: str) -> str:
|
|||
|
||||
|
||||
def ask_for_ssh_keys(ssh_key_glob: str, default: bool) -> bool:
|
||||
if not len(glob.glob(os.path.expanduser(ssh_key_glob))):
|
||||
keys = glob.glob(os.path.expanduser(ssh_key_glob))
|
||||
if not keys:
|
||||
logging.info("NOTE: No SSH public keys found to copy to the device.")
|
||||
logging.info("See https://postmarketos.org/ssh-key-glob for more information.")
|
||||
return False
|
||||
logging.info(f"SSH public keys found ({len(keys)}):")
|
||||
for key in keys:
|
||||
logging.info(f"* {key}")
|
||||
logging.info("See https://postmarketos.org/ssh-key-glob for more information.")
|
||||
return pmb.helpers.cli.confirm(
|
||||
"Would you like to copy your SSH public keys to the device?", default=default
|
||||
"Would you like to copy these public keys to the device?", default=default
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue