From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DDF86C02182 for ; Thu, 23 Jan 2025 17:48:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 820C382FB1; Thu, 23 Jan 2025 17:48:35 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id WBs7Oth-oIeU; Thu, 23 Jan 2025 17:48:34 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A5918831B0 Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id A5918831B0; Thu, 23 Jan 2025 17:48:34 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists1.osuosl.org (Postfix) with ESMTP id 9E926959 for ; Thu, 23 Jan 2025 17:48:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 79EF2831B0 for ; Thu, 23 Jan 2025 17:48:32 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Eyro0kNJlCo9 for ; Thu, 23 Jan 2025 17:48:32 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=116.202.254.214; helo=ciao.gmane.io; envelope-from=glbb-buildroot@m.gmane-mx.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org B9C9182FB1 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B9C9182FB1 Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by smtp1.osuosl.org (Postfix) with ESMTPS id B9C9182FB1 for ; Thu, 23 Jan 2025 17:48:31 +0000 (UTC) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1tb1Jc-00071x-Ds for buildroot@busybox.net; Thu, 23 Jan 2025 18:48:28 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: buildroot@busybox.net From: Grant Edwards Date: Thu, 23 Jan 2025 17:48:21 -0000 (UTC) Message-ID: References: <4b9b3ef0-afbe-4cf2-94c6-966496c4a92f@mind.be> <87frl9igj1.fsf@tarshish> User-Agent: slrn/1.0.3 (Linux) Cc: buildroot@uclibc.org X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=fail (p=none dis=none) header.from=gmail.com Subject: Re: [Buildroot] How to set target system PATH? X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" On 2025-01-23, Baruch Siach via buildroot 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