diff --git a/CHANGELOG.md b/CHANGELOG.md index 0424611a..b8792daa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Release history for s390-tools (MIT version) Changes of existing tools: Bug Fixes: + - dbginfo.sh: dash compatible copy sequence * __v2.31.0 (2024-02-02)__ diff --git a/scripts/dbginfo.sh b/scripts/dbginfo.sh index 7763067a..e363c128 100755 --- a/scripts/dbginfo.sh +++ b/scripts/dbginfo.sh @@ -15,7 +15,7 @@ export LC_ALL ######################################## # Global used variables readonly SCRIPTNAME="${0##*/}" # general name of this script -readonly STARTDIR="$(pwd)" # save calling directory +readonly FULLPATHSCRIPT="$(readlink -f "${0}")" # 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) @@ -1420,9 +1420,8 @@ 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}" + # get a copy of the script used + cp -p "${FULLPATHSCRIPT}" "${WORKPATH}" # create the archive cd "${WORKDIR_BASE}" touch "${WORKARCHIVE}"