From: Ovidiu Panait Date: Tue, 14 May 2019 08:40:55 +0000 (+0300) Subject: grub-mkconfig: Use -c instead of --printf for stat X-Git-Tag: grub-2.04~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ff34fefe4d99bc9511c0d9d64aacb79908d2b1c;p=thirdparty%2Fgrub.git grub-mkconfig: Use -c instead of --printf for stat "--printf" only works with the stat variant provided by coreutils. With busybox, stat will fail with the following error: stat: unrecognized option '--printf=%T' Usage: stat [OPTIONS] FILE... Signed-off-by: Ovidiu Panait Reviewed-by: Daniel Kiper --- diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in index 33332360e..9f477ff05 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -145,7 +145,7 @@ GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_u GRUB_FS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2> /dev/null || echo unknown`" if [ x"$GRUB_FS" = xunknown ]; then - GRUB_FS="$(stat -f --printf=%T / || echo unknown)" + GRUB_FS="$(stat -f -c %T / || echo unknown)" fi # Provide a default set of stock linux early initrd images.