From 1bd64f5b0fc1e3a0d194c48744cc918fca89c678 Mon Sep 17 00:00:00 2001 From: Steffen Maier Date: Wed, 16 Feb 2022 21:15:09 +0100 Subject: [PATCH] dbginfo.sh: sort list of environment variables for readability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "detour" with NUL terminated records ensures that sorting works as expected for environment variables with values containing one or more lines and thus '\n' as regular record separator. Reviewed-by: Joern Siglen Signed-off-by: Steffen Maier Signed-off-by: Jan Höppner --- CHANGELOG.md | 1 + scripts/dbginfo.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52788fc9..0d9d0aea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Release history for s390-tools (MIT version) - chreipl-fcp-mpath: bundle a pre-cooked version of the manpage for build environments without access to `pandoc` - dbginfo.sh: Add multipath info to map paths to FC addressing and prio group + - dbginfo.sh: Sort list of environment variables for readability Bug Fixes: diff --git a/scripts/dbginfo.sh b/scripts/dbginfo.sh index 6e22e7e8..136b16f1 100755 --- a/scripts/dbginfo.sh +++ b/scripts/dbginfo.sh @@ -427,7 +427,7 @@ CMDS="uname -a\ :systemctl --all --no-pager list-unit-files\ :systemd-delta\ :ulimit -a\ - :env\ + :env --null | sort --zero-terminated | tr '\000' '\n'\ :find /boot -print0 | sort -z | xargs -0 -n 10 ls -ld\ :find /var/crash -print0 | sort -z | xargs -0 -n 10 ls -ld\ :df -h\