]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
grub-mkconfig: Use -c instead of --printf for stat
authorOvidiu Panait <ovidiu.panait@windriver.com>
Tue, 14 May 2019 08:40:55 +0000 (11:40 +0300)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 20 May 2019 10:59:36 +0000 (12:59 +0200)
"--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>
util/grub-mkconfig.in

index 33332360eecf954fc2952df944fe171006fc4143..9f477ff05468e42c62a0cd52fa917deedebb47e9 100644 (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`"
 
 if [ x"$GRUB_FS" = xunknown ]; then
-    GRUB_FS="$(stat -f --printf=%T / || echo unknown)"
+    GRUB_FS="$(stat -f -%T / || echo unknown)"
 fi
 
 # Provide a default set of stock linux early initrd images.