wic/plugins: allow timeout of 0 for systemd-boot
PATCH 1/1 wic/plugins: allow timeout of 0 for systemd-boot
Setting a timeout value of 0 for systemd-boot evaluated to False and caused for a default timeout value of 5 to be set instead of 0.
A timeout of 0 is a valid loader.conf value for systemd-boot.
Signed-off-by Marcel Hamer <[email protected]>
--- src/wic/plugins/source/bootimg_efi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
src/wic/plugins/source/bootimg_efi.py +2 -1
@@ -145,7 +145,8 @@ class BootimgEFIPlugin(SourcePlugin): loader_conf = "" # 5 seconds is a sensible default timeout - loader_conf += "timeout %d\n" % (bootloader.timeout or 5) + timeout_val = bootloader.timeout if bootloader.timeout is not None else 5 + loader_conf += f"timeout {timeout_val}\n" logger.debug("Writing systemd-boot config " "%s/hdd/boot/loader/loader.conf", cr_workdir)
Signature · 1 line
2.47.3