Meta: Look for e2fsck path on build-image-qemu.sh

Now we attempt to look for the path of e2fsck before checking if the
path can be found in any of the predefined routes. This fixes e2fsck
not being found on some "special" distros like NixOS.

Related #13754
This commit is contained in:
Baitinq 2022-11-06 00:56:52 +01:00 committed by Andreas Kling
parent 5556b27e38
commit 45e22dafb3
Notes: sideshowbarker 2024-07-17 04:10:01 +09:00

View file

@ -50,13 +50,14 @@ if [ "$(uname -s)" = "Darwin" ]; then
E2FSCK="e2fsck" E2FSCK="e2fsck"
RESIZE2FS_PATH="resize2fs" RESIZE2FS_PATH="resize2fs"
elif [ "$(uname -s)" = "SerenityOS" ]; then elif [ ! -f "$E2FSCK" ]; then
E2FSCK="/usr/local/sbin/e2fsck" E2FSCK="$(command -v e2fsck)"
else
E2FSCK="/usr/sbin/e2fsck"
if [ ! -f "$E2FSCK" ]; then if [ ! -f "$E2FSCK" ]; then
E2FSCK=/sbin/e2fsck E2FSCK="/usr/sbin/e2fsck"
if [ ! -f "$E2FSCK" ]; then
E2FSCK="/sbin/e2fsck"
fi
fi fi
fi fi