diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 13:54:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 13:54:25 +0000 |
commit | 613b5479a576e8b54bc261055d341466fa57a937 (patch) | |
tree | 4e8f56ead3c83759cf5c9005d350926275370f66 /debian/kernel/postrm.d | |
parent | Adding upstream version 060+5. (diff) | |
download | dracut-613b5479a576e8b54bc261055d341466fa57a937.tar.xz dracut-613b5479a576e8b54bc261055d341466fa57a937.zip |
Adding debian version 060+5-1.debian/060+5-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/kernel/postrm.d')
-rwxr-xr-x | debian/kernel/postrm.d/dracut | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/kernel/postrm.d/dracut b/debian/kernel/postrm.d/dracut new file mode 100755 index 0000000..ab1c86c --- /dev/null +++ b/debian/kernel/postrm.d/dracut @@ -0,0 +1,25 @@ +#!/bin/sh + +version="$1" +bootdir=/boot + +# passing the kernel version is required +[ -z "${version}" ] && exit 0 + +# absolute file name of kernel image may be passed as a second argument; +# remove the initrd from the same directory +if [ -n "$2" ]; then + bootdir=$(dirname "$2") +fi + +# avoid running multiple times +if [ -n "$DEB_MAINT_PARAMS" ]; then + eval set -- "$DEB_MAINT_PARAMS" + if [ -z "$1" ] || [ "$1" != "remove" ]; then + exit 0 + fi +fi + + +# delete initramfs +rm -f "$bootdir/initrd.img-${version}" |