dbginfo.sh: handle relative and absolute calling path

include the dbginfo.sh script used - enabled for relative paths

Reviewed-by: Michael Storzer <mstorzer@de.ibm.com>
Signed-off-by: Joern Siglen <siglen@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Joern Siglen
2023-12-22 15:52:49 +01:00
committed by Jan Höppner
parent 43c34956fb
commit 58ef99f76b
2 changed files with 6 additions and 3 deletions

View File

@@ -32,6 +32,7 @@ Release history for s390-tools (MIT version)
- zipl/boot: compile the bootloaders only if HOST_ARCH is s390x
- zipl: Add --no-compress option to zipl command
- zkey: Also check for deconfigured and check-stopped cards
- dbginfo.sh: fix relative path on script copy
Bug Fixes:
- ap_tools/ap-check: handle get-attributes between pre and post event

View File

@@ -15,6 +15,7 @@ export LC_ALL
########################################
# Global used variables
readonly SCRIPTNAME="${0##*/}" # general name of this script
readonly STARTDIR="$(pwd)" # save calling directory
#
readonly DATETIME="$(date +%Y-%m-%d-%H-%M-%S 2>/dev/null)"
readonly DOCKER=$(if type docker >/dev/null 2>&1; then echo "YES"; else echo "NO"; fi)
@@ -1411,10 +1412,11 @@ environment_setup() {
create_package() {
local rc_tar
pr_syslog_stdout ${step_num} "Finalizing: Creating archive with collected data"
# get a copy of the script used - enabled for relative path calls
cd "${STARTDIR}"
cp -p "${BASH_SOURCE[0]}" "${WORKPATH}"
# create the archive
cd "${WORKDIR_BASE}"
# get a copy of the script used
cp -p $0 "${WORKDIR_CURRENT}"
touch "${WORKARCHIVE}"
chmod 0600 "${WORKARCHIVE}"
tar -czf "${WORKARCHIVE}" "${WORKDIR_CURRENT}"