From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 23 Jun 2023 09:02:12 +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 1qCao9-000IiW-Pr for lore@lore.pengutronix.de; Fri, 23 Jun 2023 09:02:12 +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 1qCao7-0003X1-Ef; Fri, 23 Jun 2023 09:02:11 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qCanz-0003Ws-KY; Fri, 23 Jun 2023 09:02:03 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qCanz-009RZK-0L; Fri, 23 Jun 2023 09:02:03 +0200 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1qCany-008uCl-2e; Fri, 23 Jun 2023 09:02:02 +0200 Date: Fri, 23 Jun 2023 09:02:02 +0200 From: Michael Olbrich To: Alexander Dahl Message-ID: Mail-Followup-To: Alexander Dahl , ptxdist@pengutronix.de References: <20230607091040.214960-1-ada@thorsis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230607091040.214960-1-ada@thorsis.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain Subject: Re: [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 Cc: 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 On Wed, Jun 07, 2023 at 11:10:40AM +0200, Alexander Dahl wrote: > 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. It's better than before, so I applied it. I'm not sure why my git hook did not notice that and send an email. Michael > 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 > > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |