From 90f57bbbccbfd5900625074f44f0434e2f2dc812 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Mon, 29 Jun 2020 20:54:32 +0200 Subject: [PATCH] install --ondev: set username to "user" (MR 1953) --- pmb/helpers/frontend.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pmb/helpers/frontend.py b/pmb/helpers/frontend.py index 01704f09..e457a317 100644 --- a/pmb/helpers/frontend.py +++ b/pmb/helpers/frontend.py @@ -222,6 +222,19 @@ def install(args): raise ValueError("--on-device-installer cannot be combined with" " --rsync") + # On-device installer overrides + if args.on_device_installer: + # To make code for the on-device installer not needlessly complex, just + # hardcode "user" as username here. (The on-device installer will set + # a password for the user, disable SSH password authentication, + # optionally add a new user for SSH that must not have the same + # username etc.) + if args.user != "user": + logging.warning(f"WARNING: custom username '{args.user}' will be" + " replaced with 'user' for the on-device" + " installer.") + args.user = "user" + if not args.sdcard and args.split is None: # Default to split if the flash method requires it flasher = pmb.config.flashers.get(args.deviceinfo["flash_method"], {})