index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | advaithm <advaith.madhukar@gmail.com> | 2021-04-24 13:56:35 +0530 |
---|---|---|
committer | advaithm <advaith.madhukar@gmail.com> | 2021-04-24 13:56:35 +0530 |
commit | 85e4a85cdb1cebbf4fb8c9ad59c7531e6be06ed5 (patch) | |
tree | f10eb50d88b7dd11b1df5249d95ec760332943d0 /archinstall/lib/user_interaction.py | |
parent | 1188303fb3415c6ef428b312453afa8edf4d5a4d (diff) | |
parent | 638985f17dfe1934a08b707687a29170bc1dd49c (diff) |
-rw-r--r-- | archinstall/lib/user_interaction.py | 28 |
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index 83c5e5cd..bd9d432d 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -132,17 +132,18 @@ def ask_for_additional_users(prompt='Any additional users to install (leave blan return users, super_users def ask_for_a_timezone(): - timezone = input('Enter a valid timezone (examples: Europe/Stockholm, US/Eastern) or press enter to use UTC: ').strip() - if timezone == '': - timezone = 'UTC' - if (pathlib.Path("/usr")/"share"/"zoneinfo"/timezone).exists(): - return timezone - else: - log( - f"Time zone {timezone} does not exist, continuing with system default.", - level=LOG_LEVELS.Warning, - fg='red' - ) + while True: + timezone = input('Enter a valid timezone (examples: Europe/Stockholm, US/Eastern) or press enter to use UTC: ').strip().strip('*.') + if timezone == '': + timezone = 'UTC' + if (pathlib.Path("/usr")/"share"/"zoneinfo"/timezone).exists(): + return timezone + else: + log( + f"Specified timezone {timezone} does not exist.", + level=LOG_LEVELS.Warning, + fg='red' + ) def ask_for_bootloader() -> str: bootloader = "systemd-bootctl" @@ -331,10 +332,13 @@ def select_disk(dict_o_disks): if len(drives) >= 1: for index, drive in enumerate(drives): print(f"{index}: {drive} ({dict_o_disks[drive]['size'], dict_o_disks[drive].device, dict_o_disks[drive]['label']})") - drive = generic_select(drives, 'Select one of the above disks (by number or full path) or leave blank to skip partitioning: ', + + log(f"You can skip selecting a drive and partition it and use whatever drive-setup is mounted at /mnt (experimental)", fg="yellow") + drive = generic_select(drives, 'Select one of the above disks (by name or number) or leave blank to use /mnt: ', options_output=False) if not drive: return drive + drive = dict_o_disks[drive] return drive |