]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
use mktemp "-p" instead of "--tmpdir" for busybox
authorHarald Hoyer <harald@redhat.com>
Tue, 14 Jul 2015 08:11:59 +0000 (10:11 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 15 Jul 2015 09:47:43 +0000 (11:47 +0200)
dracut-logger.sh
dracut.sh
test/test-functions

index 2a6019c6cdd6ac4167410c564518bc3774f37dca..e5c93586d1e306c256b864ada3d30cee39ff47fd 100755 (executable)
@@ -148,7 +148,7 @@ dlog_init() {
             && type -P systemd-cat &>/dev/null \
             && systemctl --quiet is-active systemd-journald.socket &>/dev/null \
             && { echo "dracut-$DRACUT_VERSION" | systemd-cat -t 'dracut' &>/dev/null; } ; then
-            readonly _dlogdir="$(mktemp --tmpdir="$TMPDIR/" -d -t dracut-log.XXXXXX)"
+            readonly _dlogdir="$(mktemp -"$TMPDIR/" -d -t dracut-log.XXXXXX)"
             readonly _systemdcatfile="$_dlogdir/systemd-cat"
             mkfifo "$_systemdcatfile"
             readonly _dlogfd=15
index b7456dc0747f2f9deb06141c9d4761acbd471447..ee0a039d3061293feb11061562e6ebc36fce3f8e 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -777,16 +777,16 @@ fi
 [[ $reproducible == yes ]] && DRACUT_REPRODUCIBLE=1
 
 readonly TMPDIR="$tmpdir"
-readonly initdir="$(mktemp --tmpdir="$TMPDIR/" -d -t initramfs.XXXXXX)"
+readonly initdir="$(mktemp -"$TMPDIR/" -d -t initramfs.XXXXXX)"
 [ -d "$initdir" ] || {
-    printf "%s\n" "dracut: mktemp --tmpdir='$TMPDIR/' -d -t initramfs.XXXXXX failed." >&2
+    printf "%s\n" "dracut: mktemp -'$TMPDIR/' -d -t initramfs.XXXXXX failed." >&2
     exit 1
 }
 
 if [[ $early_microcode = yes ]] || ( [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]] ); then
-    readonly early_cpio_dir="$(mktemp --tmpdir="$TMPDIR/" -d -t early_cpio.XXXXXX)"
+    readonly early_cpio_dir="$(mktemp -"$TMPDIR/" -d -t early_cpio.XXXXXX)"
     [ -d "$early_cpio_dir" ] || {
-        printf "%s\n" "dracut: mktemp --tmpdir='$TMPDIR/' -d -t early_cpio.XXXXXX failed." >&2
+        printf "%s\n" "dracut: mktemp -'$TMPDIR/' -d -t early_cpio.XXXXXX failed." >&2
         exit 1
     }
 fi
@@ -1614,7 +1614,7 @@ dinfo "*** Creating image file '$outfile' ***"
 
 if [[ $uefi = yes ]]; then
     uefi_outfile="$outfile"
-    readonly uefi_outdir="$(mktemp --tmpdir="$TMPDIR/" -d -t initrd.XXXXXX)"
+    readonly uefi_outdir="$(mktemp -"$TMPDIR/" -d -t initrd.XXXXXX)"
     # redirect initrd output
     outfile="$uefi_outdir/initrd"
 fi
index 1f5eed59b64d84d525d3bdf309ee755bcc9bcd5e..2b8a4d26fdfa91695ba9fb231e392769e385c8c2 100644 (file)
@@ -4,7 +4,7 @@ export PATH
 
 [[ -e .testdir ]] && . .testdir
 if [[ -z "$TESTDIR" ]] || [[ ! -d "$TESTDIR" ]]; then
-   TESTDIR=$(mktemp -d --tmpdir="/var/tmp" -t dracut-test.XXXXXX)
+   TESTDIR=$(mktemp -d -"/var/tmp" -t dracut-test.XXXXXX)
 fi
 echo "TESTDIR=\"$TESTDIR\"" > .testdir
 export TESTDIR