[edk2-devel] [PATCH 2/4] OvmfPkg/AmdSev: add Grub Firmware Volume Package

James Bottomley jejb at linux.ibm.com
Wed Nov 18 23:00:12 UTC 2020


On Mon, 2020-11-16 at 21:42 +0100, Laszlo Ersek wrote:
> On 11/12/20 01:13, James Bottomley wrote:
[...]
> > +##
> > +# different distributions have different names for grub-mkimage,
> > so
> > +# search all the known ones
> > +##
> > +for b in grub2-mkimage grub-mkimage; do
> > +    if which $b > /dev/null 2>&1; then

I did everything except this:

> (11) s/which/command -v/

The problem with command -v is that it picks up aliases, which we
definitely don't want (in the incredibly unlikely case that grub-
mkimage has an alias).  You can see the effects with ls which I've got
aliased:

jejb at jarvis:~> command -v ls
alias ls='ls -F'
jejb at jarvis:~> which ls
/bin/ls

We definitely want the latter behaviour in the script above ... I need
the absolute path to the command, so I kept the which.

James




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#67702): https://edk2.groups.io/g/devel/message/67702
Mute This Topic: https://groups.io/mt/78198619/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list