mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Add compatibility for busybox mktemp
Busybox's mktemp requires at least six X's in the template, causing the current sed --in-place check to fail because the file does not exist. This change adds additional X's to mktemp templates that do not already have at least six X's in them. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Quentin Zdanis <zdanisq@gmail.com> Closes #11269
This commit is contained in:
@@ -265,7 +265,7 @@ constrain_path() {
|
||||
create_links "$DIRS" "$ZFSTEST_FILES"
|
||||
else
|
||||
# Constrained path set to /var/tmp/constrained_path.*
|
||||
SYSTEMDIR=${SYSTEMDIR:-/var/tmp/constrained_path.XXXX}
|
||||
SYSTEMDIR=${SYSTEMDIR:-/var/tmp/constrained_path.XXXXXX}
|
||||
STF_PATH=$(mktemp -d "$SYSTEMDIR")
|
||||
STF_PATH_REMOVE="yes"
|
||||
STF_MISSING_BIN=""
|
||||
@@ -663,11 +663,11 @@ export PATH=$STF_PATH
|
||||
|
||||
if [ "$UNAME" = "FreeBSD" ] ; then
|
||||
mkdir -p "$FILEDIR" || true
|
||||
RESULTS_FILE=$(mktemp -u "${FILEDIR}/zts-results.XXXX")
|
||||
REPORT_FILE=$(mktemp -u "${FILEDIR}/zts-report.XXXX")
|
||||
RESULTS_FILE=$(mktemp -u "${FILEDIR}/zts-results.XXXXXX")
|
||||
REPORT_FILE=$(mktemp -u "${FILEDIR}/zts-report.XXXXXX")
|
||||
else
|
||||
RESULTS_FILE=$(mktemp -u -t zts-results.XXXX -p "$FILEDIR")
|
||||
REPORT_FILE=$(mktemp -u -t zts-report.XXXX -p "$FILEDIR")
|
||||
RESULTS_FILE=$(mktemp -u -t zts-results.XXXXXX -p "$FILEDIR")
|
||||
REPORT_FILE=$(mktemp -u -t zts-report.XXXXXX -p "$FILEDIR")
|
||||
fi
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user