kdump-load/save-dumps: Use shell options to improve reliability

Add hereby "set -uo pipefail", with the goal of improving
reliability (suggested by Emil/@xexaxo). Notice that the
suggestion included "-e", but we make use of this, by checking
non-zero pipes, so instead of refactoring the code to just have
this option, the choice was to not have it.

Also, make use of bash as the shell to execute the tools - after
some analysis, we make use of few bashisms that are a bummer to
change, since a lot of scripts in SteamOS make use of bash and
in general it is a very common shell, let's just go along with it.

Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
This commit is contained in:
Guilherme G. Piccoli
2022-11-28 17:43:01 -03:00
parent 0081681565
commit d8815b1cd7
3 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,5 @@
#!/bin/sh
#!/bin/bash
set -uo pipefail
#
# SPDX-License-Identifier: LGPL-2.1+
#