Skip to content

Commit

Permalink
zdev/dracut: put temporary files under the subdir ${DRACUT_TMPDIR}
Browse files Browse the repository at this point in the history
This way, dracut cleans up everything just in case the "rm" here fails.

Github-ID: #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>
  • Loading branch information
steffen-maier authored and hoeppnerj committed Dec 14, 2023
1 parent 0be83bf commit 849aa5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion zdev/dracut/95zdev-kdump/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion zdev/dracut/95zdev/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 849aa5b

Please sign in to comment.