summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Kraitschy <oliver@okraits.de>2020-01-22 21:58:43 +0100
committerAndreas Kling <kling@serenityos.org>2020-01-22 22:04:29 +0100
commit8e21e31b3ac994ebe69c2a6835a89852f82953b4 (patch)
treef9fe56284e8850bcc89533f76b01ce58ee6759ff
parentb6aae25244068f75e692e6c3bf72c3822fbb90fa (diff)
downloadserenity-8e21e31b3ac994ebe69c2a6835a89852f82953b4.zip
Build: use absolute path for /sbin/mke2fs
Distros like Debian and Ubuntu don't have /sbin in PATH, thus mke2fs is not found.
-rwxr-xr-xKernel/build-image-qemu.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/Kernel/build-image-qemu.sh b/Kernel/build-image-qemu.sh
index 75ba9f070e..f6d7941db1 100755
--- a/Kernel/build-image-qemu.sh
+++ b/Kernel/build-image-qemu.sh
@@ -25,7 +25,11 @@ if [ "$(uname -s)" = "OpenBSD" ]; then
(echo "e 0"; echo 83; echo n; echo 0; echo "*"; echo "quit") | fdisk -e $VND
mkfs.ext2 -I 128 -F /dev/${VND}i || die "couldn't create filesystem"
else
- mke2fs -q -I 128 _disk_image || die "couldn't create filesystem"
+ if [ -x /sbin/mke2fs ]; then
+ /sbin/mke2fs -q -I 128 _disk_image || die "couldn't create filesystem"
+ else
+ mke2fs -q -I 128 _disk_image || die "couldn't create filesystem"
+ fi
fi
echo "done"