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 <ovidiu.panait@windriver.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Ovidiu Panait 2019-05-14 11:40:55 +03:00 committed by Daniel Kiper
parent a06b079a36
commit 4ff34fefe4

View file

@ -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`" GRUB_FS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2> /dev/null || echo unknown`"
if [ x"$GRUB_FS" = xunknown ]; then if [ x"$GRUB_FS" = xunknown ]; then
GRUB_FS="$(stat -f --printf=%T / || echo unknown)" GRUB_FS="$(stat -f -c %T / || echo unknown)"
fi fi
# Provide a default set of stock linux early initrd images. # Provide a default set of stock linux early initrd images.