[arch-projects] [mkinitcpio][PATCH 18/26] init: extend PATH to include /usr/local bins

Dave Reisner d at falconindy.com
Mon Sep 26 22:07:37 EDT 2011


On Mon, Sep 26, 2011 at 08:54:28PM -0500, Dan McGee wrote:
> On Mon, Sep 26, 2011 at 8:22 PM, Dave Reisner <d at falconindy.com> wrote:
> > This allows a user to provide their own binaries and override anything
> > that might be provided by busybox.
> >
> > Signed-off-by: Dave Reisner <dreisner at archlinux.org>
> > ---
> >  init |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/init b/init
> > index ff4917a..e8f70a1 100644
> > --- a/init
> > +++ b/init
> > @@ -1,6 +1,6 @@
> >  #!/bin/busybox ash
> >  # Install busybox's applets as symlinks
> > -PATH=/usr/sbin:/usr/bin:/sbin:/bin
> > +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> This is totally nitpicking, but we have this order by default in /etc/profile:
> PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
> 
> Shouldn't we try to be consistent? Or at least figure out what normal is?

Maybe it's another case of not being clear enough in the commit msg.
We're sort of peeing all over /usr/bin on the busybox --install, so we
need to be able to let the user have some control. We do that by letting
them override binaries in /usr/local/bin and putting this bin above the
rest. An extremely rare use case, but a use case none the less. I could,
also, be talked out of this patch along with the busybox on build rather
than run if it seems insane.

mkinitcpio is sort of longer overdue for some documentation regarding
the rules and regulations of hook writing. Merging this would sort of
reinforce that point.

> 
> Of course, from a CentOS box...
> $ echo $PATH
> /usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin:/home/dan/bin
> 
> -Dan

Yeah, CentOS and RHEL both leave the /sbin's out of non root profiles.
Not a concern here, for obvious reasons.

d


More information about the arch-projects mailing list