diff options
author | V3n3RiX <venerix@rogentos.ro> | 2016-10-23 00:00:20 +0100 |
---|---|---|
committer | V3n3RiX <venerix@rogentos.ro> | 2016-10-23 00:00:20 +0100 |
commit | 344a5645130870363252dcdc8c8a9aeaf81a7623 (patch) | |
tree | 80902970767c07e117da7086bf33f27e283cd156 | |
parent | c75a9842ce3afbefe25f895b23a7752af4606d42 (diff) |
autoremove dracut generated initramfs at postrm
-rw-r--r-- | eclass/kogaion-kernel.eclass | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/eclass/kogaion-kernel.eclass b/eclass/kogaion-kernel.eclass index 472ce839..ba658652 100644 --- a/eclass/kogaion-kernel.eclass +++ b/eclass/kogaion-kernel.eclass @@ -701,6 +701,23 @@ _dracut_initramfs_create() { dracut -H -f -o systemd -o systemd-initrd -o systemd-networkd -o dracut-systemd --kver="${kver}" "${ROOT}boot/initramfs-genkernel-${kern_arch}-${kver}" } +_dracut_initramfs_delete() { + if use amd64 || use x86; then + if use amd64; then + local kern_arch="x86_64" + else + local kern_arch="x86" + fi + fi + if [ "${PR}" == "r0" ]; then + local kver="${PV}-${K_ROGKERNEL_SELF_TARBALL_NAME}" + else + local kver="${PV}-${K_ROGKERNEL_SELF_TARBALL_NAME}-${PR}" + fi + rm -rf "${ROOT}boot/initramfs-genkernel-${kern_arch}-${kver}" + +} + _grub2_update_grubcfg() { if [[ -x $(which grub2-mkconfig) ]]; then elog "" @@ -750,7 +767,7 @@ kogaion-kernel_pkg_prerm() { kogaion-kernel_pkg_postrm() { if _is_kernel_binary; then - elog "" + _dracut_initramfs_delete fi } |