[PATCH] applygnupgdefaults: Remove SIG prefix from signal names used in trap

Marek Vasut marex at denx.de
Fri Jul 9 21:04:44 CEST 2021

From: Fedor Ross <fedor.ross at ifm.com>

In bourne shell, the SIG prefix is optional for signal names used with
trap built-in. For example in dash, signal names with SIG prefix are not
supported at all. Drop the SIG prefix to make the script compatible with
both bash, dash, and possibly other bourne shell implementations.

No functional change.

Signed-off-by: Fedor Ross <fedor.ross at ifm.com>
Signed-off-by: Marek Vasut <marex at denx.de>
 tools/applygnupgdefaults | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/applygnupgdefaults b/tools/applygnupgdefaults
index 316509faf..60525a260 100755
--- a/tools/applygnupgdefaults
+++ b/tools/applygnupgdefaults
@@ -33,7 +33,7 @@ cleanup ()
     [ -n "$errorfile" -a -f "$errorfile" ] && rm "$errorfile"
+trap cleanup EXIT INT HUP PIPE
 errorfile=$(mktemp "/tmp/$PGM.log.XXXXXX")
 [ -n "$errorfile" -a -f "$errorfile" ] || exit 2

More information about the Gnupg-devel mailing list