mkimage: check for mkfs.xxx after setting defaults.
This commit is contained in:
parent
2c846d9f4c
commit
adf32efa6b
@ -85,12 +85,6 @@ if [ "$(id -u)" -ne 0 ]; then
|
|||||||
die "need root perms to continue, exiting."
|
die "need root perms to continue, exiting."
|
||||||
fi
|
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"
|
IMGSIZE="$2"
|
||||||
if [ -z "$IMGSIZE" ]; then
|
if [ -z "$IMGSIZE" ]; then
|
||||||
IMGSIZE="2G"
|
IMGSIZE="2G"
|
||||||
@ -108,6 +102,12 @@ if [ -z "$FILENAME" ]; then
|
|||||||
FILENAME="void-image-$(date +%Y%m%d).img"
|
FILENAME="void-image-$(date +%Y%m%d).img"
|
||||||
fi
|
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) ..."
|
info_msg "Creating disk image ($IMGSIZE) ..."
|
||||||
dd if=/dev/zero of=$FILENAME bs=$IMGSIZE count=1 conv=sparse >/dev/null 2>&1
|
dd if=/dev/zero of=$FILENAME bs=$IMGSIZE count=1 conv=sparse >/dev/null 2>&1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user