[arch-projects] [mkinitcpio][PATCH 18/26] init: extend PATH to include /usr/local bins
dpmcgee at gmail.com
Mon Sep 26 23:54:16 EDT 2011
On Mon, Sep 26, 2011 at 9:07 PM, Dave Reisner <d at falconindy.com> wrote:
> 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:
>> 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.
I think you misinterpreted me. Note the order difference in yours vs.
what I pasted from the stock Arch /etc/profile. Of course /local/ has
to come first, but I was simply pointing out the "all /bin/ first" vs
"all /local/ first" and other odd ordering choices.
> 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
> Yeah, CentOS and RHEL both leave the /sbin's out of non root profiles.
> Not a concern here, for obvious reasons.
Also not what I meant to point out- here, /sbin/ takes preference over
/bin/, always, including local. So another totally different take.
And for some more orderings...
$ pacman -Qlq initscripts | xargs grep PATH=
More information about the arch-projects