zdev/dracut: put temporary files under the subdir ${DRACUT_TMPDIR}

This way, dracut cleans up everything just in case the "rm" here fails.

Github-ID: https://github.com/ibm-s390-linux/s390-tools/pull/158
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Acked-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Steffen Maier
2023-11-08 13:54:46 +01:00
committed by Jan Höppner
parent 0be83bfbba
commit 849aa5b105
2 changed files with 2 additions and 2 deletions

View File

@@ -88,7 +88,7 @@ install() {
done
fi
_tempfile=$(mktemp --tmpdir dracut-zdev.XXXXXX)
_tempfile=$(mktemp --tmpdir="${DRACUT_TMPDIR}" dracut-zdev.XXXXXX)
# work with systems that are not based on chzdev persistent config
local _configuration="--active"

View File

@@ -103,7 +103,7 @@ install() {
# shellcheck disable=SC2154
[[ $hostonly ]] || return 0
_tempfile=$(mktemp --tmpdir dracut-zdev.XXXXXX)
_tempfile=$(mktemp --tmpdir="${DRACUT_TMPDIR}" dracut-zdev.XXXXXX)
function check_zdev() {
local _dev=$1
local _devsysfs _bdevpath