kernel-install: Add KERNEL_INSTALL_NOOP (#4103)

Will be used by rpm-ostree (and likely lorax) to suppress
RPM->kernel->%posttrans->dracut runs, and basically everything
else this script is doing.

I'll also likely change the `kernel.spec` to respect this as well.
This commit is contained in:
Colin Walters 2016-09-14 01:57:43 -04:00 committed by Martin Pitt
parent 4ffe24797c
commit 34210af7c6
1 changed files with 7 additions and 0 deletions

View File

@ -61,6 +61,13 @@ for i in "$@"; do
fi
done
# KERNEL_INSTALL_NOOP may be used by programs like lorax and rpm-ostree which
# want to install a kernel (indirectly via RPM), but control generation of the
# initramfs. In general, OSTree takes over kernel management too.
if test -n "${KERNEL_INSTALL_NOOP:-}"; then
exit 0
fi
if [[ "${0##*/}" == 'installkernel' ]]; then
COMMAND='add'
else