Add dracut-remove.sh
This commit is contained in:
parent
30366a03e6
commit
62f2a46a94
1 changed files with 10 additions and 0 deletions
10
dracut-remove.sh
Normal file
10
dracut-remove.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Save this file on /usr/local/bin/dracut-remove.sh
|
||||
#
|
||||
while read -r line; do
|
||||
if [[ "$line" == 'usr/lib/modules/'+([^/])'/pkgbase' ]]; then
|
||||
read -r pkgbase < "/${line}"
|
||||
rm -f "/boot/vmlinuz-${pkgbase}" "/boot/initramfs-${pkgbase}.img" "/boot/initramfs-${pkgbase}-fallback.img"
|
||||
fi
|
||||
done
|
Loading…
Reference in a new issue