mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
kernel/postinst.d: check for correct update-initramfs provider
Ubuntu's dracut package ships an `update-initramfs` command with the same interface as initramfs-tools'. The difference is that it calls dracut instead of mkinitramfs. When installing dracut without purging initramfs-tools, `/etc/kernel/postinst.d/initramfs-tools` will still execute `update-initramfs` (in addition to dracut's kernel postinst hook). So query the newly add `--version` parameter to determine which package provided the `update-initramfs` script. Only run the kernel postinst hook when the provider matches.
This commit is contained in:
parent
65166a6ff3
commit
2334de30e4
@ -6,6 +6,8 @@ bootopt=""
|
||||
|
||||
command -v update-initramfs >/dev/null 2>&1 || exit 0
|
||||
|
||||
test "$(update-initramfs --version | cut -d ' ' -f 1)" = initramfs-tools || exit 0
|
||||
|
||||
# passing the kernel version is required
|
||||
if [ -z "${version}" ]; then
|
||||
echo >&2 "W: initramfs-tools: ${DPKG_MAINTSCRIPT_PACKAGE:-kernel package} did not pass a version number"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user