Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/__init__.py27
-rw-r--r--archinstall/lib/installer.py2
2 files changed, 10 insertions, 19 deletions
diff --git a/archinstall/__init__.py b/archinstall/__init__.py
index ee4748f6..b914c7ec 100644
--- a/archinstall/__init__.py
+++ b/archinstall/__init__.py
@@ -23,7 +23,7 @@ from .lib.user_interaction import *
parser = ArgumentParser()
-__version__ = "2.2.0.dev1"
+__version__ = "2.2.0.RC1"
def initialize_arguments():
@@ -32,16 +32,7 @@ def initialize_arguments():
parser.add_argument("--silent", action="store_true",
help="Warning!!! No prompts, ignored if config is not passed")
parser.add_argument("--script", default="guided", nargs="?", help="Script to run for installation", type=str)
- parser.add_argument("--vars",
- metavar="KEY=VALUE",
- nargs='?',
- help="Set a number of key-value pairs "
- "(do not put spaces before or after the = sign). "
- "If a value contains spaces, you should define "
- "it with double quotes: "
- 'foo="this is a sentence". Note that '
- "values are always treated as strings.")
- args = parser.parse_args()
+ args, unknowns = parser.parse_known_args()
if args.config is not None:
try:
# First, let's check if this is a URL scheme instead of a filename
@@ -57,13 +48,13 @@ def initialize_arguments():
print(e)
# Installation can't be silent if config is not passed
config["silent"] = args.silent
- if args.vars is not None:
- try:
- for var in args.vars.split(' '):
- key, val = var.split("=")
- config[key] = val
- except Exception as e:
- print(e)
+ for arg in unknowns:
+ if '--' == arg[:2]:
+ if '=' in arg:
+ key, val = [x.strip() for x in arg[2:].split('=', 1)]
+ else:
+ key, val = arg[2:], True
+ config[key] = val
config["script"] = args.script
return config
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index 1be398e9..b459e990 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -453,7 +453,7 @@ class Installer:
self.pacstrap('efibootmgr')
o = b''.join(SysCommand(f'/usr/bin/arch-chroot {self.target} grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB'))
SysCommand('/usr/bin/arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg')
- self.helper_flags['bootloder'] = True
+ self.helper_flags['bootloader'] = True
return True
else:
root_device = subprocess.check_output(f'basename "$(readlink -f /sys/class/block/{root_partition.path.replace("/dev/", "")}/..)"', shell=True).decode().strip()