From: Grant Edwards <grant.b.edwards@gmail.com>
To: buildroot@busybox.net
Cc: buildroot@uclibc.org
Subject: Re: [Buildroot] How to set target system PATH?
Date: Thu, 23 Jan 2025 17:48:21 -0000 (UTC) [thread overview]
Message-ID: <vmtvd4$pjv$1@ciao.gmane.io> (raw)
In-Reply-To: 87frl9igj1.fsf@tarshish
On 2025-01-23, Baruch Siach via buildroot <buildroot@buildroot.org> wrote:
> Hi Arnout, Grant,
>
> On Thu, Jan 23 2025, Arnout Vandecappelle via buildroot wrote:
>> On 23/01/2025 18:00, Grant Edwards wrote:
>>> I've set the desired PATH in the config file:
>>> BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin:/apps/bin"
>>> But that only seems to affect login shells, and not daemons started
>>> from /etc/init.d.
>>> How do I set the _system_ PATH rather than just the login shell PATH.
>>
>> Good question! That depends on the init system (because that one is
>> responsible to set the path). I looked in the source, and it looks like both
>> systemd and busybox init hardcode it without any configuration option...
>
> Busybox code indicates that you can extend the default PATH by setting
> the BB_ADDITIONAL_PATH macro in CFLAGS.
>
> SysV init appears to hard code the PATH.
Great! I'm using busybox init, so I'll try setting CONFIG_EXTRA_CFLAGS
in the busybox config. I'd really like to avoid having to munge rc.S
with a post-build script.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2025-01-23 17:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-23 17:00 [Buildroot] How to set target system PATH? Grant Edwards
2025-01-23 17:18 ` Arnout Vandecappelle via buildroot
2025-01-23 17:30 ` Baruch Siach via buildroot
2025-01-23 17:48 ` Grant Edwards [this message]
2025-01-23 17:32 ` Grant Edwards
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='vmtvd4$pjv$1@ciao.gmane.io' \
--to=grant.b.edwards@gmail.com \
--cc=buildroot@busybox.net \
--cc=buildroot@uclibc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox