From: Daan De Meyer Date: Fri, 7 Aug 2020 18:55:15 +0000 (+0100) Subject: Arch: Add bootctl update pacman hook X-Git-Tag: v6~26^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F490%2Fhead;p=thirdparty%2Fmkosi.git Arch: Add bootctl update pacman hook --- diff --git a/mkosi b/mkosi index 7470d00bb..eb5732c6c 100755 --- a/mkosi +++ b/mkosi @@ -2379,6 +2379,25 @@ def install_arch(args: CommandLineArguments, root: str, do_run_build_script: boo make_executable(kernel_remove_script) + if args.esp_partno is not None: + bootctl_update_hook = os.path.join(hooks_dir, "91-mkosi-bootctl-update-hook") + with open(bootctl_update_hook, 'w') as f: + f.write( + dedent( + """\ + [Trigger] + Operation = Upgrade + Type = Package + Target = systemd + + [Action] + Description = Updating systemd-boot... + When = PostTransaction + Exec = /usr/bin/bootctl update + """ + ) + ) + keyring = "archlinux" if platform.machine() == "aarch64": keyring += "arm"