about summary refs log tree commit diff
path: root/mkimage.sh.in
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2013-11-11 10:09:00 +0100
committerJuan RP <xtraeme@gmail.com>2013-11-11 10:09:00 +0100
commitadf32efa6bb38796b231050316b0b6229cbf9c48 (patch)
tree11b0495723a584d6a4069393289fbd8ac5d349a9 /mkimage.sh.in
parent2c846d9f4cf09a1943eeb7c04bc269d0c4fe9658 (diff)
downloadhrmpf-adf32efa6bb38796b231050316b0b6229cbf9c48.tar.gz
hrmpf-adf32efa6bb38796b231050316b0b6229cbf9c48.tar.xz
hrmpf-adf32efa6bb38796b231050316b0b6229cbf9c48.zip
mkimage: check for mkfs.xxx after setting defaults.
Diffstat (limited to 'mkimage.sh.in')
-rw-r--r--mkimage.sh.in12
1 files changed, 6 insertions, 6 deletions
diff --git a/mkimage.sh.in b/mkimage.sh.in
index b3b8800..fe92a6e 100644
--- a/mkimage.sh.in
+++ b/mkimage.sh.in
@@ -85,12 +85,6 @@ if [ "$(id -u)" -ne 0 ]; then
     die "need root perms to continue, exiting."
 fi
 
-for f in parted mkfs.${BOOT_FSTYPE} mkfs.${ROOT_FSTYPE}; do
-    if ! which ${f} >/dev/null; then
-        die "Cannot find ${f}, exiting."
-    fi
-done
-
 IMGSIZE="$2"
 if [ -z "$IMGSIZE" ]; then
     IMGSIZE="2G"
@@ -108,6 +102,12 @@ if [ -z "$FILENAME" ]; then
     FILENAME="void-image-$(date +%Y%m%d).img"
 fi
 
+for f in parted mkfs.${BOOT_FSTYPE} mkfs.${ROOT_FSTYPE}; do
+    if ! which ${f} >/dev/null; then
+        die "Cannot find ${f}, exiting."
+    fi
+done
+
 info_msg "Creating disk image ($IMGSIZE) ..."
 dd if=/dev/zero of=$FILENAME bs=$IMGSIZE count=1 conv=sparse >/dev/null 2>&1