Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2019-12-26 00:53:43 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2019-12-26 00:53:43 +0000
commit33f107255e55332c893d8e8ed49b11179673b9f5 (patch)
tree531953249413c09bd8833420f683aa9215957066
parent00d0a29c491d5641d589bdacccdd0726c44f4951 (diff)
Added more debugging to systemd journald
-rw-r--r--archinstall.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/archinstall.py b/archinstall.py
index 64c1a164..05a18596 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -1050,6 +1050,7 @@ def run_post_install_steps(*positionals, **kwargs):
rerun = args['ignore-rerun']
for title in conf:
+ log(f'Running post installation step {title}', level=4, origin='run_post_install_steps')
if args['rerun'] and args['rerun'] != title and not rerun:
continue
else:
@@ -1058,6 +1059,7 @@ def run_post_install_steps(*positionals, **kwargs):
print('[N] Network Deploy: {}'.format(title))
if type(conf[title]) == str:
print('[N] Loading {} configuration'.format(conf[title]))
+ log(f'Loading {conf[title]} configuration', level=4, origin='run_post_install_steps')
conf[title] = get_application_instructions(conf[title])
for command in conf[title]:
@@ -1091,8 +1093,10 @@ def run_post_install_steps(*positionals, **kwargs):
## Either skipping mounting /run and using traditional chroot is an option, but using
## `systemd-nspawn -D /mnt --machine temporary` might be a more flexible solution in case of file structure changes.
if 'no-chroot' in opts and opts['no-chroot']:
+ log(f'Executing {command} as simple command from live-cd.', level=4, origin='run_post_install_steps')
o = simple_command(command, opts)
elif 'chroot' in opts and opts['chroot']:
+ log(f'Executing {command} in chroot.', level=4, origin='run_post_install_steps')
## Run in a manually set up version of arch-chroot (arch-chroot will break namespaces).
## This is a bit risky in case the file systems changes over the years, but we'll probably be safe adding this as an option.
## **> Prefer if possible to use 'no-chroot' instead which "live boots" the OS and runs the command.
@@ -1107,6 +1111,7 @@ def run_post_install_steps(*positionals, **kwargs):
o = simple_command("cd /mnt; umount -R proc")
else:
if 'boot' in opts and opts['boot']:
+ log(f'Executing {command} in boot mode.', level=4, origin='run_post_install_steps')
## So, if we're going to boot this maddafakker up, we'll need to
## be able to login. The quickest way is to just add automatic login.. so lessgo!
@@ -1136,11 +1141,15 @@ def run_post_install_steps(*positionals, **kwargs):
## Not needed anymore: And cleanup after out selves.. Don't want to leave any residue..
# os.remove('/mnt/etc/systemd/system/console-getty.service.d/override.conf')
else:
+ log(f'Executing {command} in with systemd-nspawn without boot.', level=4, origin='run_post_install_steps')
o = b''.join(sys_command('/usr/bin/systemd-nspawn -D /mnt --machine temporary {c}'.format(c=command), **opts))
if type(conf[title][raw_command]) == bytes and len(conf[title][raw_command]) and not conf[title][raw_command] in o:
+ log(f'{command} failed: {o.decode("UTF-8")}', level=4, origin='run_post_install_steps')
print('[W] Post install command failed: {}'.format(o.decode('UTF-8')))
#print(o)
+ return True
+
if __name__ == '__main__':
## Setup some defaults
# (in case no command-line parameters or netdeploy-params were given)