2016-03-07 07:56:31

by Murphy Zhou

[permalink] [raw]
Subject: [PATCH trivial] scripts/prune-kernel: remove kdump images

Signed-off-by: Xiong Zhou <[email protected]>
---
scripts/prune-kernel | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/prune-kernel b/scripts/prune-kernel
index ab5034e..9c67be2 100755
--- a/scripts/prune-kernel
+++ b/scripts/prune-kernel
@@ -14,7 +14,7 @@ do
echo "removing $f"
rm -f "/boot/initramfs-$f.img" "/boot/System.map-$f"
rm -f "/boot/vmlinuz-$f" "/boot/config-$f"
- rm -rf "/lib/modules/$f"
+ rm -rf "/lib/modules/$f" "/boot/initramfs-${f}kdump.img"
new-kernel-pkg --remove $f
fi
done
--
2.5.0


2016-04-26 01:31:39

by Murphy Zhou

[permalink] [raw]
Subject: Re: [PATCH trivial] scripts/prune-kernel: remove kdump images

ping ?

On Mon, Mar 7, 2016 at 3:56 PM, Xiong Zhou <[email protected]> wrote:
> Signed-off-by: Xiong Zhou <[email protected]>
> ---
> scripts/prune-kernel | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/prune-kernel b/scripts/prune-kernel
> index ab5034e..9c67be2 100755
> --- a/scripts/prune-kernel
> +++ b/scripts/prune-kernel
> @@ -14,7 +14,7 @@ do
> echo "removing $f"
> rm -f "/boot/initramfs-$f.img" "/boot/System.map-$f"
> rm -f "/boot/vmlinuz-$f" "/boot/config-$f"
> - rm -rf "/lib/modules/$f"
> + rm -rf "/lib/modules/$f" "/boot/initramfs-${f}kdump.img"
> new-kernel-pkg --remove $f
> fi
> done
> --
> 2.5.0

2016-04-28 05:52:22

by Baoquan He

[permalink] [raw]
Subject: Re: [PATCH trivial] scripts/prune-kernel: remove kdump images

On 03/07/16 at 03:56pm, Xiong Zhou wrote:
> Signed-off-by: Xiong Zhou <[email protected]>
> ---
> scripts/prune-kernel | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/prune-kernel b/scripts/prune-kernel
> index ab5034e..9c67be2 100755
> --- a/scripts/prune-kernel
> +++ b/scripts/prune-kernel
> @@ -14,7 +14,7 @@ do
> echo "removing $f"
> rm -f "/boot/initramfs-$f.img" "/boot/System.map-$f"
> rm -f "/boot/vmlinuz-$f" "/boot/config-$f"
> - rm -rf "/lib/modules/$f"
> + rm -rf "/lib/modules/$f" "/boot/initramfs-${f}kdump.img"

It makes sense to remove kdump initramfs file if its related kernel and
modules directory have been removed. I like this fix, maybe it's better
to add at least one line of description to tell why it deserves removal.

Thanks
Baoquan