From nobody Mon Mar 21 13:27:49 2022 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E627D1A17717 for ; Mon, 21 Mar 2022 13:45:21 +0000 (UTC) (envelope-from pmc@citylink.dinoex.sub.org) Received: from uucp.dinoex.org (uucp.dinoex.org [IPv6:2a0b:f840::12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "uucp.dinoex.sub.de", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KMbTs0L0Nz4ZtF for ; Mon, 21 Mar 2022 13:45:20 +0000 (UTC) (envelope-from pmc@citylink.dinoex.sub.org) Received: from uucp.dinoex.sub.de (uucp.dinoex.org [185.220.148.12]) by uucp.dinoex.org (8.17.1/8.17.1) with ESMTPS id 22LDj4av005924 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 21 Mar 2022 14:45:05 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) X-Authentication-Warning: uucp.dinoex.sub.de: Host uucp.dinoex.org [185.220.148.12] claimed to be uucp.dinoex.sub.de Received: (from uucp@localhost) by uucp.dinoex.sub.de (8.17.1/8.17.1/Submit) with UUCP id 22LDj4c9005923; Mon, 21 Mar 2022 14:45:04 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) Received: from gate.intra.daemon.contact (gate-e [192.168.98.2]) by citylink.dinoex.sub.de (8.16.1/8.16.1) with ESMTP id 22LDSnms006755; Mon, 21 Mar 2022 14:28:49 +0100 (CET) (envelope-from peter@gate.intra.daemon.contact) Received: from gate.intra.daemon.contact (gate-e [192.168.98.2]) by gate.intra.daemon.contact (8.16.1/8.16.1) with ESMTPS id 22LDRnjF006257 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 21 Mar 2022 14:27:49 +0100 (CET) (envelope-from peter@gate.intra.daemon.contact) Received: (from peter@localhost) by gate.intra.daemon.contact (8.16.1/8.16.1/Submit) id 22LDRnqZ006256; Mon, 21 Mar 2022 14:27:49 +0100 (CET) (envelope-from peter) Date: Mon, 21 Mar 2022 14:27:49 +0100 From: Peter To: freebsd-stable@freebsd.org Cc: Andre Albsmeier Subject: Different PATHs in /etc/rc and /etc/rc.shutdown Message-ID: List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Milter: Spamilter (Reciever: uucp.dinoex.sub.de; Sender-ip: 185.220.148.12; Sender-helo: uucp.dinoex.sub.de;) X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (uucp.dinoex.org [185.220.148.12]); Mon, 21 Mar 2022 14:45:07 +0100 (CET) X-Rspamd-Queue-Id: 4KMbTs0L0Nz4ZtF X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pmc@citylink.dinoex.sub.org designates 2a0b:f840::12 as permitted sender) smtp.mailfrom=pmc@citylink.dinoex.sub.org X-Spamd-Result: default: False [-1.30 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; DMARC_NA(0.00)[sub.org]; NEURAL_SPAM_SHORT(1.00)[1.000]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[freebsd-stable]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:205376, ipnet:2a0b:f840::/32, country:DE]; RCVD_TLS_LAST(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Quoting Andre Albsmeier: > Today I was bitten by the fact that /etc/rc.shutdown and /etc/rc set different > PATHs at least on 12.3-STABLE (I used a command sitting in /usr/local/sbin w/o > specifying its path and it worked in stop_cmd() but not in start_cmd()): > > /etc/rc.shutdown: PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin > /etc/rc: PATH=/sbin:/bin:/usr/sbin:/usr/bin > > Is there a reason for this? Or should they be made equal? In the latter case > I will file a PR... These paths are explicitely set in the /etc/rc and /etc/rc.shutdown; i.e. the reason(s) should be in the commitlog. Does it make sense? In my eyes, no. Having added /usr/local/sbin but not /usr/local/bin does already look painsome to me. Checking the commitlog: The /usr/local/sbin comes from the original version of these files, but was removed from /etc/rc in 2002 per 903163ac3e17 Here is your reason. Might that one just have forgotten to remove it from rc.shutdown also? But then, just removing it now might surprizingly break some things people may have come up with in their takedown stuff. And, while ports were somehow optional back then, they are pretty standard by now, so I might alternatively suggest to add /usr/local/bin and /usr/local/sbin to both of the scripts. cheerio, PMc