[Trigger] Operation = Install Operation = Upgrade Type = File Target = usr/lib/modules/*/vmlinuz [Action] Description = Installing kernel and initrd to $BOOT (kernel-install) When = PostTransaction Exec = /bin/bash -c 'shopt -s extglob && while read -r vmlinuz; do kver="$(basename "$(dirname "${vmlinuz}")")" && vmlinuz="$(realpath "${vmlinuz}")" && printf "kernel-install add %s %s\n" "${kver}" "${vmlinuz}" && kernel-install add "${kver}" "${vmlinuz}"; done' Depends = bash Depends = systemd NeedsTargets