From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 07 Jun 2023 11:12:36 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q6pDZ-00E88M-41 for lore@lore.pengutronix.de; Wed, 07 Jun 2023 11:12:36 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1q6pDV-0002mq-PU; Wed, 07 Jun 2023 11:12:33 +0200 Received: from mail.thorsis.com ([92.198.35.195]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q6pCz-0002mO-4u for ptxdist@pengutronix.de; Wed, 07 Jun 2023 11:12:01 +0200 Received: from adahl by ada.ifak-system.com with local (Exim 4.94.2) (envelope-from ) id 1q6pBg-000tvr-9x for ptxdist@pengutronix.de; Wed, 07 Jun 2023 11:10:40 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=default; t=1686129119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MzrZwekYqyqHgIl0Af9CIfpEgeU4PQEy6+2o5qlt0bo=; b=jTOsN2fvr9cH2RcEIZnn2Cr185Ju5N8LADX70ituBMOsFSU0lTtslAy+M8+dNhY4gHlKMc RHDUIe6R13KIE67P/oltDSymf9tjJODwVY6vVVFt/iZRd1XGEXZ0TGN+2cA8l5SiOe7KDC PZaGcafSkjtiFKj/5lYh9+aHKTMe2kL4FzeuNrv+ic8nd/XhX1/5fi5wMO8lWSwID6iPRH FwjGjghq+K6CvgTY1BV+y9VxUBQKaEL7Y8X9BYmCOmTbzyk+sKf6Zb8jqD5jcq4jJ8R/YL R3ld4ImNfcHZX1BIWFDP0/Lte/lq+TjPCHKHC+XkwY+/eMCaPiHpQcp+9FEMYg== From: Alexander Dahl To: ptxdist@pengutronix.de Date: Wed, 7 Jun 2023 11:10:40 +0200 Message-Id: <20230607091040.214960-1-ada@thorsis.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH] bbinit: Remove /bin and /sbin from PATH after /usr merge X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false The so called /usr merge was done back with ptxdist-2017.05.0 and since then /bin is just a symlink to /usr/bin and /sbin just a symlink to /usr/sbin. Putting /bin _and_ /usr/bin to PATH would actually put the same directory twice to PATH. Signed-off-by: Alexander Dahl --- Notes: Not sure if this should have been RFC first? This does not affect PATH set by /etc/profile on login and there are more scripts outside of /etc/init.d which set a PATH. projectroot/etc/init.d/NetworkManager | 2 +- projectroot/etc/init.d/atd | 2 +- projectroot/etc/init.d/avahi-daemon | 2 +- projectroot/etc/init.d/chrony | 2 +- projectroot/etc/init.d/dropbear | 2 +- projectroot/etc/init.d/haveged | 2 +- projectroot/etc/init.d/inetd | 2 +- projectroot/etc/init.d/lighttpd | 2 +- projectroot/etc/init.d/lldpd | 2 +- projectroot/etc/init.d/monit | 2 +- projectroot/etc/init.d/nftables | 2 +- projectroot/etc/init.d/ntp-client | 2 +- projectroot/etc/init.d/ntp-server | 2 +- projectroot/etc/init.d/openssh | 2 +- projectroot/etc/init.d/proftpd | 2 +- projectroot/etc/init.d/pureftpd | 2 +- projectroot/etc/init.d/rc-once | 2 +- projectroot/etc/init.d/samba | 2 +- projectroot/etc/init.d/sysctl | 2 +- projectroot/etc/init.d/zeroconf | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/projectroot/etc/init.d/NetworkManager b/projectroot/etc/init.d/NetworkManager index 50a5467ad..f76e01131 100644 --- a/projectroot/etc/init.d/NetworkManager +++ b/projectroot/etc/init.d/NetworkManager @@ -19,7 +19,7 @@ exec_prefix=/usr sbindir=${exec_prefix}/sbin localstatedir=/var -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin DESC="network connection manager" NAME="NetworkManager" diff --git a/projectroot/etc/init.d/atd b/projectroot/etc/init.d/atd index 7253f646c..62bfef811 100644 --- a/projectroot/etc/init.d/atd +++ b/projectroot/etc/init.d/atd @@ -3,7 +3,7 @@ # # atd # -PATH=/usr/bin:/usr/sbin:/bin:/sbin +PATH=/usr/bin:/usr/sbin PREFIX="atd: " ATD="/usr/sbin/atd" diff --git a/projectroot/etc/init.d/avahi-daemon b/projectroot/etc/init.d/avahi-daemon index 27c22cc52..7aadb7525 100644 --- a/projectroot/etc/init.d/avahi-daemon +++ b/projectroot/etc/init.d/avahi-daemon @@ -4,7 +4,7 @@ # Mi 22. Jul 21:46:28 CEST 2009 #set -e -PATH=/sbin:/bin:/usr/bin +PATH=/usr/sbin:/usr/bin BINARY=/usr/sbin/avahi-daemon OPTIONS="-D" diff --git a/projectroot/etc/init.d/chrony b/projectroot/etc/init.d/chrony index d112927f8..a40e2e621 100644 --- a/projectroot/etc/init.d/chrony +++ b/projectroot/etc/init.d/chrony @@ -7,7 +7,7 @@ # Last change: Bjørn Bürger # Date: Tue Mar 6 16:00:30 UTC 2007 -PATH=/sbin:/bin:/usr/bin:/usr/sbin +PATH=/usr/sbin:/usr/bin BINARY="/usr/sbin/chronyd" CONFIG="/etc/chrony/chrony.conf" PREFIX="chrony: " diff --git a/projectroot/etc/init.d/dropbear b/projectroot/etc/init.d/dropbear index 1b16de20a..bec330ab2 100644 --- a/projectroot/etc/init.d/dropbear +++ b/projectroot/etc/init.d/dropbear @@ -1,6 +1,6 @@ #!/bin/sh -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/dropbear NAME=dropbear diff --git a/projectroot/etc/init.d/haveged b/projectroot/etc/init.d/haveged index 1a4fc62a2..14e391320 100755 --- a/projectroot/etc/init.d/haveged +++ b/projectroot/etc/init.d/haveged @@ -1,6 +1,6 @@ #!/bin/sh -PATH='/sbin:/usr/sbin:/bin:/usr/bin' +PATH='/usr/sbin:/usr/bin' DESC='haveged entropy daemon' NAME='haveged' DAEMON="/usr/sbin/$NAME" diff --git a/projectroot/etc/init.d/inetd b/projectroot/etc/init.d/inetd index 128d41a82..8fb10d994 100644 --- a/projectroot/etc/init.d/inetd +++ b/projectroot/etc/init.d/inetd @@ -3,7 +3,7 @@ # This is an inetd init.d script which ist called by init(1) with [start|stop] as argument # -PATH=/sbin:/bin:/usr/bin +PATH=/usr/sbin:/usr/bin BINARY=/usr/sbin/inetd # --- nothing to change after this line --- diff --git a/projectroot/etc/init.d/lighttpd b/projectroot/etc/init.d/lighttpd index 24a17e2a0..e1b17c984 100644 --- a/projectroot/etc/init.d/lighttpd +++ b/projectroot/etc/init.d/lighttpd @@ -3,7 +3,7 @@ # # lighttpd # -PATH=/usr/bin:/usr/sbin:/bin:/sbin +PATH=/usr/bin:/usr/sbin PREFIX="lighttpd: " LIGHTTPD="/usr/sbin/lighttpd" diff --git a/projectroot/etc/init.d/lldpd b/projectroot/etc/init.d/lldpd index 00c8240f5..a592730fb 100755 --- a/projectroot/etc/init.d/lldpd +++ b/projectroot/etc/init.d/lldpd @@ -1,6 +1,6 @@ #!/bin/sh -PATH=/sbin:/usr/sbin:/bin:/usr/bin +PATH=/usr/sbin:/usr/bin DESC="LLDP daemon" NAME=lldpd DAEMON=/usr/sbin/$NAME diff --git a/projectroot/etc/init.d/monit b/projectroot/etc/init.d/monit index 96ec86ab9..c27543204 100644 --- a/projectroot/etc/init.d/monit +++ b/projectroot/etc/init.d/monit @@ -1,6 +1,6 @@ #!/bin/sh -PATH=/sbin:/usr/sbin:/bin:/usr/bin +PATH=/usr/sbin:/usr/bin DESC="daemon monitor" NAME=monit DAEMON=/usr/bin/$NAME diff --git a/projectroot/etc/init.d/nftables b/projectroot/etc/init.d/nftables index c10db5d90..27a5d707e 100644 --- a/projectroot/etc/init.d/nftables +++ b/projectroot/etc/init.d/nftables @@ -7,7 +7,7 @@ CONF=/etc/nftables.conf -PATH=/sbin:/usr/sbin:/bin:/usr/bin +PATH=/usr/sbin:/usr/bin DESC="firewall service" NAME=nftables BIN=/usr/sbin/nft diff --git a/projectroot/etc/init.d/ntp-client b/projectroot/etc/init.d/ntp-client index edca3f297..d3748c5e5 100644 --- a/projectroot/etc/init.d/ntp-client +++ b/projectroot/etc/init.d/ntp-client @@ -3,7 +3,7 @@ # This is a ntp-client init.d script which ist called by init(1) with # [start|stop] as argument -PATH=/sbin:/bin:/usr/bin +PATH=/usr/sbin:/usr/bin BINARY=/usr/sbin/ntpdc PIDFILE="/var/run/ntpdc.pid" CONFIG="/etc/ntp-client.conf" diff --git a/projectroot/etc/init.d/ntp-server b/projectroot/etc/init.d/ntp-server index bda35616e..550cd7bfa 100644 --- a/projectroot/etc/init.d/ntp-server +++ b/projectroot/etc/init.d/ntp-server @@ -3,7 +3,7 @@ # This is a ntp init.d script which ist called by init(1) with [start|stop] as argument # -PATH=/sbin:/bin:/usr/bin +PATH=/usr/sbin:/usr/bin BINARY=/usr/sbin/ntpd PIDFILE="/var/run/ntpd.pid" CONFIG="/etc/ntp-server.conf" diff --git a/projectroot/etc/init.d/openssh b/projectroot/etc/init.d/openssh index b65880e5d..ad760ddda 100644 --- a/projectroot/etc/init.d/openssh +++ b/projectroot/etc/init.d/openssh @@ -1,6 +1,6 @@ #!/bin/sh -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/sshd NAME=sshd PIDFILE=/var/run/sshd.pid diff --git a/projectroot/etc/init.d/proftpd b/projectroot/etc/init.d/proftpd index ae69bb814..4ebd008e1 100644 --- a/projectroot/etc/init.d/proftpd +++ b/projectroot/etc/init.d/proftpd @@ -4,7 +4,7 @@ # Start the proftpd FTP daemon. # -PATH=/bin:/usr/bin:/sbin:/usr/sbin +PATH=/usr/bin:/usr/sbin DAEMON=/usr/sbin/proftpd NAME=proftpd diff --git a/projectroot/etc/init.d/pureftpd b/projectroot/etc/init.d/pureftpd index 4d23aec2c..a89f62a82 100644 --- a/projectroot/etc/init.d/pureftpd +++ b/projectroot/etc/init.d/pureftpd @@ -3,7 +3,7 @@ # /etc/init.d/pure-ftpd # -PATH=/bin:/usr/bin:/sbin:/usr/sbin +PATH=/usr/bin:/usr/sbin # defaults DAEMON="pure-ftpd" diff --git a/projectroot/etc/init.d/rc-once b/projectroot/etc/init.d/rc-once index e610254ef..657dd047f 100644 --- a/projectroot/etc/init.d/rc-once +++ b/projectroot/etc/init.d/rc-once @@ -1,6 +1,6 @@ #!/bin/sh -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin . /usr/lib/init/initmethod-bbinit-functions.sh . /usr/lib/init/rc-once.sh diff --git a/projectroot/etc/init.d/samba b/projectroot/etc/init.d/samba index a85bdc5db..04761ecfb 100644 --- a/projectroot/etc/init.d/samba +++ b/projectroot/etc/init.d/samba @@ -1,7 +1,7 @@ #!/bin/sh # -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin DAEMON_SMB=/usr/sbin/smbd DAEMON_NMB=/usr/sbin/nmbd NAME=samba diff --git a/projectroot/etc/init.d/sysctl b/projectroot/etc/init.d/sysctl index d23f9d5b2..5be2fad9d 100644 --- a/projectroot/etc/init.d/sysctl +++ b/projectroot/etc/init.d/sysctl @@ -2,7 +2,7 @@ # /etc/init.d/sysctl: Set kernel variables from /etc/sysctl.conf # -PATH=/sbin:$PATH +PATH=/usr/sbin:$PATH which sysctl > /dev/null || exit 0 case "$1" in diff --git a/projectroot/etc/init.d/zeroconf b/projectroot/etc/init.d/zeroconf index ad4ebc135..6fc0f98fe 100644 --- a/projectroot/etc/init.d/zeroconf +++ b/projectroot/etc/init.d/zeroconf @@ -3,7 +3,7 @@ # This is a zeroconf init.d script which ist called by init(1) with [start|stop] as argument # Mi 22. Jul 21:46:28 CEST 2009 -PATH=/sbin:/bin:/usr/bin +PATH=/usr/sbin:/usr/bin BINARY=/usr/sbin/avahi-autoipd OPTIONS="--force-bind -D" INTERFACES="eth0" base-commit: 2354b57b893f0e116ad3b56fe2c9826d08748094 -- 2.30.2