summarylogtreecommitdiffstats
path: root/dracut-remove
diff options
context:
space:
mode:
authorLeonidas P2022-02-20 01:33:39 +0200
committerLeonidas P2022-02-20 01:33:39 +0200
commit437acadfecc3ef8086e0228d9d8a76c398eb6282 (patch)
treea2d8fc05f262339aed0de9e16542951d03297b4c /dracut-remove
parente0dac9b1b0bd3597a77b2784cd611edef8ad13f2 (diff)
downloadaur-437acadfecc3ef8086e0228d9d8a76c398eb6282.tar.gz
Create initrd in kernel module directory also
Diffstat (limited to 'dracut-remove')
-rwxr-xr-xdracut-remove6
1 files changed, 4 insertions, 2 deletions
diff --git a/dracut-remove b/dracut-remove
index be3180b05891..a37ac760ee91 100755
--- a/dracut-remove
+++ b/dracut-remove
@@ -2,7 +2,9 @@
while read -r line; do
if [[ "${line}" == */pkgbase ]]; then
- read -r pkgbase < "/${line}"
- rm -f "/boot/vmlinuz-${pkgbase}" "/boot/initramfs-${pkgbase}.img" "/boot/initramfs-${pkgbase}-fallback.img"
+ pkgbase="$(<"/${line}")"
+ kver="$(echo ${line} | cut -d/ -f4)"
+
+ rm -rf "/usr/lib/modules/${kver}" "/boot/vmlinuz-${pkgbase}" "/boot/initramfs-${pkgbase}.img" "/boot/initramfs-${pkgbase}-fallback.img"
fi
done