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"