Contents of /trunk/dracut/patches/dracut-043-busybox-mktemp.patch
Parent Directory | Revision Log
Revision 2713 -
(show annotations)
(download)
Fri Nov 6 12:26:14 2015 UTC (8 years, 10 months ago) by niro
File size: 2759 byte(s)
Fri Nov 6 12:26:14 2015 UTC (8 years, 10 months ago) by niro
File size: 2759 byte(s)
-use busybox compat options for mktemp
1 | diff -Naur dracut-043/dracut-logger.sh dracut-043-busybox/dracut-logger.sh |
2 | --- dracut-043/dracut-logger.sh 2015-06-15 12:27:21.000000000 +0200 |
3 | +++ dracut-043-busybox/dracut-logger.sh 2015-11-06 13:18:32.521529677 +0100 |
4 | @@ -148,7 +148,7 @@ |
5 | && type -P systemd-cat &>/dev/null \ |
6 | && systemctl --quiet is-active systemd-journald.socket &>/dev/null \ |
7 | && { echo "dracut-$DRACUT_VERSION" | systemd-cat -t 'dracut' &>/dev/null; } ; then |
8 | - readonly _dlogdir="$(mktemp --tmpdir="$TMPDIR/" -d -t dracut-log.XXXXXX)" |
9 | + readonly _dlogdir="$(mktemp -p "$TMPDIR/" -d -t dracut-log.XXXXXX)" |
10 | readonly _systemdcatfile="$_dlogdir/systemd-cat" |
11 | mkfifo "$_systemdcatfile" |
12 | readonly _dlogfd=15 |
13 | diff -Naur dracut-043/dracut.sh dracut-043-busybox/dracut.sh |
14 | --- dracut-043/dracut.sh 2015-06-15 12:27:21.000000000 +0200 |
15 | +++ dracut-043-busybox/dracut.sh 2015-11-06 13:19:39.588724894 +0100 |
16 | @@ -877,16 +877,16 @@ |
17 | [[ $reproducible == yes ]] && DRACUT_REPRODUCIBLE=1 |
18 | |
19 | readonly TMPDIR="$tmpdir" |
20 | -readonly initdir="$(mktemp --tmpdir="$TMPDIR/" -d -t initramfs.XXXXXX)" |
21 | +readonly initdir="$(mktemp -p "$TMPDIR/" -d -t initramfs.XXXXXX)" |
22 | [ -d "$initdir" ] || { |
23 | - printf "%s\n" "dracut: mktemp --tmpdir='$TMPDIR/' -d -t initramfs.XXXXXX failed." >&2 |
24 | + printf "%s\n" "dracut: mktemp -p '$TMPDIR/' -d -t initramfs.XXXXXX failed." >&2 |
25 | exit 1 |
26 | } |
27 | |
28 | if [[ $early_microcode = yes ]] || ( [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]] ); then |
29 | - readonly early_cpio_dir="$(mktemp --tmpdir="$TMPDIR/" -d -t early_cpio.XXXXXX)" |
30 | + readonly early_cpio_dir="$(mktemp -p "$TMPDIR/" -d -t early_cpio.XXXXXX)" |
31 | [ -d "$early_cpio_dir" ] || { |
32 | - printf "%s\n" "dracut: mktemp --tmpdir='$TMPDIR/' -d -t early_cpio.XXXXXX failed." >&2 |
33 | + printf "%s\n" "dracut: mktemp -p '$TMPDIR/' -d -t early_cpio.XXXXXX failed." >&2 |
34 | exit 1 |
35 | } |
36 | fi |
37 | @@ -1710,7 +1710,7 @@ |
38 | |
39 | if [[ $uefi = yes ]]; then |
40 | uefi_outfile="$outfile" |
41 | - readonly uefi_outdir="$(mktemp --tmpdir="$TMPDIR/" -d -t initrd.XXXXXX)" |
42 | + readonly uefi_outdir="$(mktemp -p "$TMPDIR/" -d -t initrd.XXXXXX)" |
43 | # redirect initrd output |
44 | outfile="$uefi_outdir/initrd" |
45 | fi |
46 | diff -Naur dracut-043/test/test-functions dracut-043-busybox/test/test-functions |
47 | --- dracut-043/test/test-functions 2015-06-15 12:27:21.000000000 +0200 |
48 | +++ dracut-043-busybox/test/test-functions 2015-11-06 13:18:56.463242267 +0100 |
49 | @@ -4,7 +4,7 @@ |
50 | |
51 | [[ -e .testdir ]] && . .testdir |
52 | if [[ -z "$TESTDIR" ]] || [[ ! -d "$TESTDIR" ]]; then |
53 | - TESTDIR=$(mktemp -d --tmpdir="/var/tmp" -t dracut-test.XXXXXX) |
54 | + TESTDIR=$(mktemp -d -p "/var/tmp" -t dracut-test.XXXXXX) |
55 | fi |
56 | echo "TESTDIR=\"$TESTDIR\"" > .testdir |
57 | export TESTDIR |