[PATCH 1/3] kdumpctl: Do not redirect error messages to /dev/null
Dave Young
dyoung at redhat.com
Fri Sep 5 02:14:00 UTC 2014
On 09/03/14 at 12:07pm, Vivek Goyal wrote:
> Does anybody know why are we redirecting stderr to /dev/null when using
> kexec load/unload commands? This sounds wrong to me. In case of error I
> have no idea what went wrong.
Seems it was 2>&1 originally, it's strange to redirect to /dev/null..
I think we can remove the redirection safely.
>
> Systemctl already puts all the information in journal. So if we are worried
> that user will be bombarded with error messages, that should not be a concern.
>
> So do not redirect stderr to /dev/null.
>
> Signed-off-by: Vivek Goyal <vgoyal at redhat.com>
> ---
> kdumpctl | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kdumpctl b/kdumpctl
> index 70d30fa..bb98225 100755
> --- a/kdumpctl
> +++ b/kdumpctl
> @@ -435,7 +435,7 @@ load_kdump()
>
> $KEXEC $KEXEC_ARGS $standard_kexec_args \
> --command-line="$KDUMP_COMMANDLINE" \
> - --initrd=$TARGET_INITRD $kdump_kernel 2>/dev/null
> + --initrd=$TARGET_INITRD $kdump_kernel
> if [ $? == 0 ]; then
> echo "kexec: loaded kdump kernel"
> return 0
> @@ -826,7 +826,7 @@ stop_fadump()
>
> stop_kdump()
> {
> - $KEXEC -p -u 2>/dev/null
> + $KEXEC -p -u
> if [ $? != 0 ]; then
> echo "kexec: failed to unload kdump kernel"
> return 1
> --
> 1.9.0
>
> _______________________________________________
> kexec mailing list
> kexec at lists.fedoraproject.org
> https://lists.fedoraproject.org/mailman/listinfo/kexec
More information about the kexec
mailing list