On Fri, Sep 15, 2017, 01:58 Colin Watson <cjwat...@ubuntu.com> wrote:

> On Thu, Sep 14, 2017 at 09:22:01PM +0200, Paul Lagerweij wrote:
> > On Wed, 13 Sep 2017 at 09:17:42PM +0100, Colin Watson wrote:
> > > > On Wed, Sep 13, 2017 at 11:02:48AM -0400, Konrad Rzeszutek Wilk
> wrote:
> > > > > @@ -62,9 +63,15 @@ case x"$GRUB_FS" in
> > > > > +   zfs_active_bootfs="`zpool list -H -o bootfs ${rpool} || true`"
> > > >
> > > > Is zpool usually in /sbin or such? Perhaps a full path?
> > >
> > > Full paths are brittle when they refer to something installed by a
> > > different package.  If you need to do that kind of thing then it's
> > > usually better to temporarily extend $PATH instead.
> >
> > Do you mean that grub-mkconfig has its own $PATH and that I should
> > temporarily change it to the user's $PATH? If so, can the 10_linux script
> > see the user's $PATH?
>
> No, that's not what we mean.  Konrad's point is that /sbin (and
> /usr/sbin) may not be in $PATH when grub-mkconfig is invoked.  (I'm not
> sure I agree that this is likely because grub-mkconfig is normally
> invoked as root and root's $PATH normally includes /sbin, but Konrad
> seems to think it's a possibility worth worrying about.)
>
> A reasonable solution to this kind of thing is to set
> PATH="$PATH:/sbin:/usr/sbin" to ensure that utilities there are
> available.
>
If the user is not root mkconfig doesn't produce a useful output, so
manually extending path with sbin is unnecessary

>
> --
> Colin Watson                                       [cjwat...@ubuntu.com]
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to