Skip to contentSkip to conversation

Use /tmp instead of /var/tmp for temporary data.

PATCH New Amadeusz Żołnowski 1 participant 1 message Mar 26, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use /tmp instead of /var/tmp for temporary data.

/var/tmp is supposed to store temporary data which should be preserved over reboots, wheras /tmp is for short-term temporary data. Moreover /tmp is usually tmpfs which may make generating initramfs a bit faster.

Thanks to Martin von Gagern <[email protected]> for pointing that out.

---
 dracut.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
dracut.sh +2 -2
index 1bf8ad9..fb8bd1e 100755
@@ -544,8 +544,8 @@ elif [[ -f "$outfile" && ! -w "$outfile" ]]; then
     exit 1
 fi
 
-readonly TMPDIR=/var/tmp
-readonly initdir=$(mktemp --tmpdir=/var/tmp/ -d -t initramfs.XXXXXX)
+readonly TMPDIR=/tmp
+readonly initdir=$(mktemp --tmpdir=$TMPDIR/ -d -t initramfs.XXXXXX)
 [ -d "$initdir" ] || {
     dfatal "mktemp failed."
     exit 1
Signature · 1 line
1.7.8.5