This fixes#1020396 in a superior way by using
$KERNEL_INSTALL_STAGING_AREA, available since systemd v251:
367165a406
By just copying the file we both simplify our code,
but defer to 90-loaderentry to correctly permission it,
and simply never generate an unversioned initrd in the first place!
When removing, kernel-install calls its plugins with only three arguments [0]
(in contrast to adding where it's four arguments). Since we are running with
"set -u", trying to expand the fourth argument causes the script to fail.
However, as the $KERNEL_IMAGE variable is never used, we can simply remove it.
[0] https://github.com/systemd/systemd/blob/v232/src/kernel-install/kernel-install#L140Closes: #845977
60- does not leave much room for scripts that want to run before initrd
building (which is usually one of the latest things to do), so bump to 85.
Thanks to Sjoerd Simons for the suggestion.