Use mktemp instead of tempfile in gate_hook.sh

The gate_hook.sh file uses `tempfile`, which does not exist in Fedora
28. In Ubuntu it is marked as deprecated in favor of `mktemp`, which
does exist in Fedora 28. Since we would like to add a set of tests
running on Fedora 28 it makes sense to replace references to `tempfile`
with `mktemp`.

Change-Id: I9c97cc03b569f8ded6b65358c23f04353e12169d
This commit is contained in:
Nate Johnston 2018-09-18 22:17:08 -04:00
parent eaff4be1c1
commit c5d55d692a
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ function load_rc_hook {
local hook="$1"
local tmpfile
local config
tmpfile=$(tempfile)
tmpfile=$(mktemp)
config=$(cat $GATE_HOOKS/$hook)
echo "[[local|localrc]]" > $tmpfile
$DSCONF setlc_raw $tmpfile "$config"
@ -44,7 +44,7 @@ function load_conf_hook {
# Tweak gate configuration for our rally scenarios
function load_rc_for_rally {
for file in $(ls $RALLY_EXTRA_DIR/*.setup); do
tmpfile=$(tempfile)
tmpfile=$(mktemp)
config=$(cat $file)
echo "[[local|localrc]]" > $tmpfile
$DSCONF setlc_raw $tmpfile "$config"