Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAggam Rahamim <agamclass@gmail.com>2021-04-25 14:55:39 +0300
committerAggam Rahamim <agamclass@gmail.com>2021-04-25 14:55:39 +0300
commit5c9859d316b8064949370c03745cfd99e0d67670 (patch)
treed697dcb0595a653a2ed269df4568c90c92a4107b /examples
parent8b9f16a0284c5261a29b9818809cbe45a9c0c10b (diff)
having ability to use multiple kernels
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/examples/guided.py b/examples/guided.py
index e6abe872..ee7b63d9 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -2,6 +2,7 @@ import getpass, time, json, os
import archinstall
from archinstall.lib.hardware import hasUEFI
from archinstall.lib.profiles import Profile
+from archinstall.lib.user_interaction import generic_select
if hasUEFI() is False:
log("ArchInstall currently only supports machines booted with UEFI. MBR & GRUB support is coming in version 2.2.0!", fg="red", level=archinstall.LOG_LEVELS.Error)
@@ -168,7 +169,6 @@ def ask_user_questions():
# Ask about audio server selection if one is not already set
if not archinstall.arguments.get('audio', None):
-
# only ask for audio server selection on a desktop profile
if str(archinstall.arguments['profile']) == 'Profile(desktop)':
archinstall.arguments['audio'] = archinstall.ask_for_audio_selection()
@@ -178,12 +178,15 @@ def ask_user_questions():
archinstall.arguments['audio'] = None
# Ask what kernel user wants:
- kernel = input("1. linux\n2. linux-lts\n3. linux-zen\nchoose a kernel of the following: ")
- try:
- archinstall.arguments['kernel'] = ['linux', 'linux-lts', 'linux-zen'][int(kernel) - 1]
- except:
- archinstall.log('invalid kernel selected. defaulting to \'linux\'.')
- archinstall.arguments['kernel'] = 'linux'
+ while True:
+ kernel = generic_select(["linux", "linux-lts", "linux-zen", "continue"], "choose a kernel:")
+ if (archinstall.arguments['kernels'] == None or archinstall.arguments['kernels'] == ""):
+ archinstall.arguments['kernels'] = kernel
+ else:
+ if (kernel == "continue"):
+ break
+ archinstall.arguments['kernels'] += "," + kernel
+
# Additional packages (with some light weight error handling for invalid package names)
@@ -281,7 +284,7 @@ def perform_installation(mountpoint):
Only requirement is that the block devices are
formatted and setup prior to entering this function.
"""
- with archinstall.Installer(mountpoint, kernel=archinstall.arguments['kernel']) as installation:
+ with archinstall.Installer(mountpoint, kernels=archinstall.arguments['kernels']) as installation:
## if len(mirrors):
# Certain services might be running that affects the system during installation.
# Currently, only one such service is "reflector.service" which updates /etc/pacman.d/mirrorlist