diff options
author | Josh Robson Chase <josh@robsonchase.com> | 2021-10-15 10:17:09 -0400 |
---|---|---|
committer | Josh Robson Chase <josh@robsonchase.com> | 2021-11-05 12:11:22 -0400 |
commit | 3efc2de6d1c001b55daafa60f605255e31d676ea (patch) | |
tree | 1bd6bf447e76208982eece1b25c88fb78719446f /nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py | |
parent | 4ddc78818e4d69605f49f5f8faa22fb4601b0a0c (diff) |
nixos/systemd-boot: Use the correct version string from the bootctl --version output
Diffstat (limited to 'nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py')
-rw-r--r-- | nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py index aa59c08119de..05b77ff6e5a1 100644 --- a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py +++ b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py @@ -214,7 +214,7 @@ def main() -> None: subprocess.check_call(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "--no-variables", "install"]) else: # Update bootloader to latest if needed - systemd_version = subprocess.check_output(["@systemd@/bin/bootctl", "--version"], universal_newlines=True).split()[1] + systemd_version = subprocess.check_output(["@systemd@/bin/bootctl", "--version"], universal_newlines=True).split()[2] sdboot_status = subprocess.check_output(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "status"], universal_newlines=True) # See status_binaries() in systemd bootctl.c for code which generates this @@ -228,7 +228,7 @@ def main() -> None: # Let systemd-boot attempt an installation if a previous one wasn't found needs_install = True else: - sdboot_version = m.group(2) + sdboot_version = f'({m.group(2)})' if systemd_version != sdboot_version: print("updating systemd-boot from %s to %s" % (sdboot_version, systemd_version)) needs_install = True |