Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples/guided.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-11-06 00:08:13 +0000
committerGitHub <noreply@github.com>2021-11-06 00:08:13 +0000
commit17fe62c641607cc460e6c6590192ad8de0a21b1a (patch)
treec545eddea5d417166fbc7cd6d6fbe7c4129f5c0b /examples/guided.py
parente411ff0abb11cb0e9117555ada9e84d944dd5ea9 (diff)
parent0fed0b3ce544204ef3ef5ba155825e916f358323 (diff)
Merge pull request #678 from archlinux/torxed-fix-175
Adding support for swap on zram
Diffstat (limited to 'examples/guided.py')
-rw-r--r--examples/guided.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 19fff406..b1c34464 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -126,6 +126,9 @@ def ask_user_questions():
if not archinstall.arguments.get("bootloader", None):
archinstall.arguments["bootloader"] = archinstall.ask_for_bootloader()
+ if not archinstall.arguments.get('swap', None):
+ archinstall.arguments['swap'] = archinstall.ask_for_swap()
+
# Get the hostname for the machine
if not archinstall.arguments.get('hostname', None):
archinstall.arguments['hostname'] = input('Desired hostname for the installation: ').strip(' ')
@@ -155,7 +158,7 @@ def ask_user_questions():
# Ask about audio server selection if one is not already set
if not archinstall.arguments.get('audio', None):
# The argument to ask_for_audio_selection lets the library know if it's a desktop profile
- archinstall.arguments['audio'] = archinstall.ask_for_audio_selection(archinstall.profiles.is_desktop_profile(archinstall.arguments['profile']))
+ archinstall.arguments['audio'] = archinstall.ask_for_audio_selection(archinstall.is_desktop_profile(archinstall.arguments['profile']))
# Ask for preferred kernel:
if not archinstall.arguments.get("kernels", None):
@@ -268,6 +271,8 @@ def perform_installation(mountpoint):
if archinstall.arguments["bootloader"] == "grub-install" and archinstall.has_uefi():
installation.add_additional_packages("grub")
installation.add_bootloader(archinstall.arguments["bootloader"])
+ if archinstall.arguments['swap']:
+ installation.setup_swap('zram')
# If user selected to copy the current ISO network configuration
# Perform a copy of the config