summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-07-27 19:47:21 +0200
committerDave Reisner <dreisner@archlinux.org>2011-09-27 12:18:04 +0200
commite0549901aec53f3a0dc9577e88c4077d7bd9f6a7 (patch)
tree50e7fdd771dc82b07b0f74cdd9c0f87e4bb900a2
parent1d7411e22a89da4aa57480fe6420d5dbfb2eca90 (diff)
downloadmkinitcpio-e0549901aec53f3a0dc9577e88c4077d7bd9f6a7.tar.gz
mkinitcpio-e0549901aec53f3a0dc9577e88c4077d7bd9f6a7.tar.xz
mkinitcpio: explicitly create $BUILDROOT
Avoids explosions if a user has no HOOKS in their config, as seen: https://bbs.archlinux.org/viewtopic.php?pid=966344 Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-xmkinitcpio3
1 files changed, 3 insertions, 0 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 98bea64..0116722 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -183,6 +183,9 @@ fi
TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/mkinitcpio.XXXXXX")
declare BUILDROOT=$TMPDIR/root
+# explicitly create the buildroot
+mkdir "$TMPDIR/root"
+
# use preset $PRESET
if [[ $PRESET ]]; then
# allow absolute path to preset file, else resolve it