about summary refs log tree commit diff
path: root/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
diff options
context:
space:
mode:
authorJosh Robson Chase <josh@robsonchase.com>2021-09-30 10:25:40 -0400
committerJosh Robson Chase <josh@robsonchase.com>2021-11-05 12:11:19 -0400
commit1d5ffa8cac35c4d1dbae6506ac10913deb1320b5 (patch)
tree8de5e551ea331c71e55e95c80f5f54d21b9e68cb /nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
parentf275d82a2fa655e69fd9775b7e183f688ef11979 (diff)
nixos/systemd-boot: Fix installed version regexp
The regexp was only matching numbers and not the '.', so everyone using
systemd-boot would always see `could not find any previously installed
systemd-boot` on a `nixos-rebuild`.
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.py2
1 files changed, 1 insertions, 1 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 7134b4321630e..27b2abc1eabc0 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
@@ -218,7 +218,7 @@ def main() -> None:
         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
-        m = re.search("^\W+File:.*/EFI/(BOOT|systemd)/.*\.efi \(systemd-boot (\d+)\)$",
+        m = re.search("^\W+File:.*/EFI/(BOOT|systemd)/.*\.efi \(systemd-boot ([\d.]+)[^)]*\)$",
                       sdboot_status, re.IGNORECASE | re.MULTILINE)
         if m is None:
             print("could not find any previously installed systemd-boot")