diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in index 3e12b2c0e..2d80f14bf 100644 --- a/util/grub-mkconfig_lib.in +++ b/util/grub-mkconfig_lib.in @@ -34,7 +34,7 @@ if test "x$grub_mkrelpath" = x; then grub_mkrelpath="${bindir}/@grub_mkrelpath@" fi -if which gettext >/dev/null 2>/dev/null; then +if command -v gettext >/dev/null; then : else gettext () { diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in index cf42f55e8..1b91c102f 100644 --- a/util/grub.d/30_os-prober.in +++ b/util/grub.d/30_os-prober.in @@ -30,7 +30,7 @@ if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then exit 0 fi -if [ -z "`which os-prober 2> /dev/null`" ] || [ -z "`which linux-boot-prober 2> /dev/null`" ] ; then +if ! command -v os-prober > /dev/null || ! command -v linux-boot-prober > /dev/null ; then # missing os-prober and/or linux-boot-prober exit 0 fi