index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archinstall/__init__.py | 4 | ||||
-rw-r--r-- | archinstall/lib/installer.py | 6 | ||||
-rw-r--r-- | archinstall/lib/locale_helpers.py | 3 | ||||
-rw-r--r-- | archinstall/lib/mirrors.py | 9 |
diff --git a/archinstall/__init__.py b/archinstall/__init__.py index 9943ab3c..d98b6daa 100644 --- a/archinstall/__init__.py +++ b/archinstall/__init__.py @@ -16,10 +16,6 @@ from .lib.hardware import * __version__ = "2.1.3" -if hasUEFI() is False: - log("ArchInstall currently only supports machines booted with UEFI. MBR & GRUB support is coming in version 2.2.0!", level=LOG_LEVELS.Error, fg="red") - exit(1) - ## Basic version of arg.parse() supporting: ## --key=value ## --boolean diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index c50b2ac7..758033a7 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -447,6 +447,12 @@ class Installer(): o = b''.join(sys_command(f"/usr/bin/arch-chroot {self.target} sh -c \"echo '{user}:{password}' | chpasswd\"")) pass + + def user_set_shell(self, user, shell): + self.log(f'Setting shell for {user} to {shell}', level=LOG_LEVELS.Info) + + o = b''.join(sys_command(f"/usr/bin/arch-chroot {self.target} sh -c \"chsh -s {shell} {user}\"")) + pass def set_keyboard_language(self, language): if len(language.strip()): diff --git a/archinstall/lib/locale_helpers.py b/archinstall/lib/locale_helpers.py index 523a23d5..82964dc9 100644 --- a/archinstall/lib/locale_helpers.py +++ b/archinstall/lib/locale_helpers.py @@ -1,3 +1,4 @@ +import subprocess import os from .exceptions import * @@ -26,4 +27,4 @@ def search_keyboard_layout(filter, layout='qwerty'): yield language def set_keyboard_language(locale): - return os.system(f'loadkeys {locale}') == 0 + return subprocess.call(['loadkeys',locale]) == 0 diff --git a/archinstall/lib/mirrors.py b/archinstall/lib/mirrors.py index d7d35782..04f47c0d 100644 --- a/archinstall/lib/mirrors.py +++ b/archinstall/lib/mirrors.py @@ -74,10 +74,15 @@ def re_rank_mirrors(top=10, *positionals, **kwargs): def list_mirrors(): url = f"https://archlinux.org/mirrorlist/?protocol=https&ip_version=4&ip_version=6&use_mirror_status=on" - - response = urllib.request.urlopen(url) regions = {} + try: + response = urllib.request.urlopen(url) + except urllib.error.URLError as err: + log(f'Could not fetch an active mirror-list: {err}', level=LOG_LEVELS.Warning, fg="yellow") + return regions + + region = 'Unknown region' for line in response.readlines(): if len(line.strip()) == 0: |