index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds+github@gmail.com> | 2020-11-04 22:41:50 +0100 |
---|---|---|
committer | Anton Hvornum <anton.feeds+github@gmail.com> | 2020-11-04 22:41:50 +0100 |
commit | b98850819bdbdb23e354bb5bf5d5383cf807d22d (patch) | |
tree | 8c2f5138612e532837dedfefc2832bd14b519abe /examples/guided.py | |
parent | e06ca749a4382c37350d36cf08aa3fa5369ce9e2 (diff) |
-rw-r--r-- | examples/guided.py | 15 |
diff --git a/examples/guided.py b/examples/guided.py index 70c2050d..ee57e2b5 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -1,5 +1,13 @@ +import getpass, time, json, sys, signal, os import archinstall -import getpass, time, json, sys, signal + +# Setup a global log file. +# Archinstall will honor storage['logfile'] in most of it's functions log handle. +log_root = os.path.join(os.path.expanduser('~/'), '.cache/archinstall') +if not os.path.isdir(log_root): + os.makedirs(log_root) + +archinstall.storage['logfile'] = f"{log_root}/install-session_{self.init_time}.{self.milliseconds}.log" """ This signal-handler chain (and global variable) @@ -29,7 +37,7 @@ def perform_installation(device, boot_partition, language, 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 # We need to wait for it before we continue since we opted in to use a custom mirror/region. - archinstall.log(f'Waiting for automatic mirror selection has completed before using custom mirrors.') + installation.log(f'Waiting for automatic mirror selection has completed before using custom mirrors.') while 'dead' not in (status := archinstall.service_state('reflector')): time.sleep(1) @@ -136,6 +144,9 @@ while 1: if type(profile) != str: # Got a imported profile archinstall.storage['_guided']['profile'] = profile[0] # The second return is a module, and not a handle/object. if not profile[1]._prep_function(): + # TODO: See how we can incorporate this into + # the general log flow. As this is pre-installation + # session setup. Which creates the installation.log file. archinstall.log( ' * Profile\'s preparation requirements was not fulfilled.', bg='black', |