mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 0/3] rc-once: Minor script cleanup
@ 2021-08-27  8:33 Alexander Dahl
  2021-08-27  8:33 ` [ptxdist] [PATCH 1/3] dropbear: Remove not needed include from init script Alexander Dahl
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Alexander Dahl @ 2021-08-27  8:33 UTC (permalink / raw)
  To: ptxdist

Hei hei,

I did some code reading in /usr/lib/systemd/systemd-rc-once to
understand what it does and while at it noticed some minor flaws with
included shell libraries all somehow related to that rc-once mechanism.
Those scripts did still work, because there's the /lib -> /usr/lib
symbolic link.

Greets
Alex

Alexander Dahl (3):
  dropbear: Remove not needed include from init script
  rc-once: Adapt path in scripts including shell lib
  rc-once: Fix include path

 projectroot/etc/init.d/dropbear             | 2 --
 projectroot/etc/init.d/rc-once              | 4 ++--
 projectroot/usr/lib/systemd/systemd-rc-once | 4 ++--
 3 files changed, 4 insertions(+), 6 deletions(-)


base-commit: 76d1f680233955839298435e9faf11f15434b4a4
-- 
2.30.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ptxdist] [PATCH 1/3] dropbear: Remove not needed include from init script
  2021-08-27  8:33 [ptxdist] [PATCH 0/3] rc-once: Minor script cleanup Alexander Dahl
@ 2021-08-27  8:33 ` Alexander Dahl
  2021-10-07 10:18   ` [ptxdist] [APPLIED] " Michael Olbrich
  2021-08-27  8:33 ` [ptxdist] [PATCH 2/3] rc-once: Adapt path in scripts including shell lib Alexander Dahl
  2021-08-27  8:33 ` [ptxdist] [PATCH 3/3] rc-once: Fix include path Alexander Dahl
  2 siblings, 1 reply; 7+ messages in thread
From: Alexander Dahl @ 2021-08-27  8:33 UTC (permalink / raw)
  To: ptxdist

After migrating to rc-once this script does not use any functions from
the included (shell) library anymore.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
Fixes: 0e0f5d31e0e0 ("[dropbear] use rc-once to create server keys")
---
 projectroot/etc/init.d/dropbear | 2 --
 1 file changed, 2 deletions(-)

diff --git a/projectroot/etc/init.d/dropbear b/projectroot/etc/init.d/dropbear
index 8f7438462..1edda1116 100644
--- a/projectroot/etc/init.d/dropbear
+++ b/projectroot/etc/init.d/dropbear
@@ -7,8 +7,6 @@ NAME=dropbear
 DROPBEAR_PORT=22
 DROPBEAR_EXTRA_ARGS=
 
-. /lib/init/initmethod-bbinit-functions.sh
-
 # test ! -h /var/service/dropbear || exit 0
 
 DROPBEAR_RSAKEY_DEFAULT="@KEYDIR@/dropbear_rsa_host_key"
-- 
2.30.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ptxdist] [PATCH 2/3] rc-once: Adapt path in scripts including shell lib
  2021-08-27  8:33 [ptxdist] [PATCH 0/3] rc-once: Minor script cleanup Alexander Dahl
  2021-08-27  8:33 ` [ptxdist] [PATCH 1/3] dropbear: Remove not needed include from init script Alexander Dahl
@ 2021-08-27  8:33 ` Alexander Dahl
  2021-10-07 10:18   ` [ptxdist] [APPLIED] " Michael Olbrich
  2021-08-27  8:33 ` [ptxdist] [PATCH 3/3] rc-once: Fix include path Alexander Dahl
  2 siblings, 1 reply; 7+ messages in thread
From: Alexander Dahl @ 2021-08-27  8:33 UTC (permalink / raw)
  To: ptxdist

The usr/lib/init/rc-once.sh script was moved for /usr merge, but scripts
using this piece were not updated.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
Fixes: e74c5e613d9e ("rc-once: /usr merge")
---
 projectroot/etc/init.d/rc-once              | 2 +-
 projectroot/usr/lib/systemd/systemd-rc-once | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/projectroot/etc/init.d/rc-once b/projectroot/etc/init.d/rc-once
index 2387c3157..bf8473149 100644
--- a/projectroot/etc/init.d/rc-once
+++ b/projectroot/etc/init.d/rc-once
@@ -3,7 +3,7 @@
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
 . /lib/init/initmethod-bbinit-functions.sh
-. /lib/init/rc-once.sh
+. /usr/lib/init/rc-once.sh
 
 do_start() {
 	test -e "$STAMP" && return
diff --git a/projectroot/usr/lib/systemd/systemd-rc-once b/projectroot/usr/lib/systemd/systemd-rc-once
index db3d84e3c..3ab5d75c5 100644
--- a/projectroot/usr/lib/systemd/systemd-rc-once
+++ b/projectroot/usr/lib/systemd/systemd-rc-once
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 . /lib/init/initmethod-bbinit-functions.sh
-. /lib/init/rc-once.sh
+. /usr/lib/init/rc-once.sh
 
 start() {
 	if ! mount_root_rw; then
-- 
2.30.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ptxdist] [PATCH 3/3] rc-once: Fix include path
  2021-08-27  8:33 [ptxdist] [PATCH 0/3] rc-once: Minor script cleanup Alexander Dahl
  2021-08-27  8:33 ` [ptxdist] [PATCH 1/3] dropbear: Remove not needed include from init script Alexander Dahl
  2021-08-27  8:33 ` [ptxdist] [PATCH 2/3] rc-once: Adapt path in scripts including shell lib Alexander Dahl
@ 2021-08-27  8:33 ` Alexander Dahl
  2021-10-07 10:18   ` [ptxdist] [APPLIED] " Michael Olbrich
  2 siblings, 1 reply; 7+ messages in thread
From: Alexander Dahl @ 2021-08-27  8:33 UTC (permalink / raw)
  To: ptxdist

The initmethod shell library was moved, but the include path in scripts
using it, was not adapted back then.

Fixes: 5c7e5b48a39f ("initmethod: /usr merge")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
 projectroot/etc/init.d/rc-once              | 2 +-
 projectroot/usr/lib/systemd/systemd-rc-once | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/projectroot/etc/init.d/rc-once b/projectroot/etc/init.d/rc-once
index bf8473149..e610254ef 100644
--- a/projectroot/etc/init.d/rc-once
+++ b/projectroot/etc/init.d/rc-once
@@ -2,7 +2,7 @@
 
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
-. /lib/init/initmethod-bbinit-functions.sh
+. /usr/lib/init/initmethod-bbinit-functions.sh
 . /usr/lib/init/rc-once.sh
 
 do_start() {
diff --git a/projectroot/usr/lib/systemd/systemd-rc-once b/projectroot/usr/lib/systemd/systemd-rc-once
index 3ab5d75c5..7dc9bf6f4 100644
--- a/projectroot/usr/lib/systemd/systemd-rc-once
+++ b/projectroot/usr/lib/systemd/systemd-rc-once
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-. /lib/init/initmethod-bbinit-functions.sh
+. /usr/lib/init/initmethod-bbinit-functions.sh
 . /usr/lib/init/rc-once.sh
 
 start() {
-- 
2.30.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] [APPLIED] dropbear: Remove not needed include from init script
  2021-08-27  8:33 ` [ptxdist] [PATCH 1/3] dropbear: Remove not needed include from init script Alexander Dahl
@ 2021-10-07 10:18   ` Michael Olbrich
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Olbrich @ 2021-10-07 10:18 UTC (permalink / raw)
  To: ptxdist; +Cc: Alexander Dahl

Thanks, applied as b3a6165bc649036bcb381a13f8ff20f746df9e93.

Michael

[sent from post-receive hook]

On Thu, 07 Oct 2021 12:18:31 +0200, Alexander Dahl <ada@thorsis.com> wrote:
> After migrating to rc-once this script does not use any functions from
> the included (shell) library anymore.
> 
> Signed-off-by: Alexander Dahl <ada@thorsis.com>
> Fixes: 0e0f5d31e0e0 ("[dropbear] use rc-once to create server keys")
> Message-Id: <20210827083353.22152-2-ada@thorsis.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/projectroot/etc/init.d/dropbear b/projectroot/etc/init.d/dropbear
> index 8f7438462a46..1edda1116a93 100644
> --- a/projectroot/etc/init.d/dropbear
> +++ b/projectroot/etc/init.d/dropbear
> @@ -7,8 +7,6 @@ NAME=dropbear
>  DROPBEAR_PORT=22
>  DROPBEAR_EXTRA_ARGS=
>  
> -. /lib/init/initmethod-bbinit-functions.sh
> -
>  # test ! -h /var/service/dropbear || exit 0
>  
>  DROPBEAR_RSAKEY_DEFAULT="@KEYDIR@/dropbear_rsa_host_key"

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] [APPLIED] rc-once: Adapt path in scripts including shell lib
  2021-08-27  8:33 ` [ptxdist] [PATCH 2/3] rc-once: Adapt path in scripts including shell lib Alexander Dahl
@ 2021-10-07 10:18   ` Michael Olbrich
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Olbrich @ 2021-10-07 10:18 UTC (permalink / raw)
  To: ptxdist; +Cc: Alexander Dahl

Thanks, applied as 65a6f73e1254c197829cee761df29f8465e562e3.

Michael

[sent from post-receive hook]

On Thu, 07 Oct 2021 12:18:32 +0200, Alexander Dahl <ada@thorsis.com> wrote:
> The usr/lib/init/rc-once.sh script was moved for /usr merge, but scripts
> using this piece were not updated.
> 
> Signed-off-by: Alexander Dahl <ada@thorsis.com>
> Fixes: e74c5e613d9e ("rc-once: /usr merge")
> Message-Id: <20210827083353.22152-3-ada@thorsis.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/projectroot/etc/init.d/rc-once b/projectroot/etc/init.d/rc-once
> index 2387c315732a..bf8473149cc2 100644
> --- a/projectroot/etc/init.d/rc-once
> +++ b/projectroot/etc/init.d/rc-once
> @@ -3,7 +3,7 @@
>  PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
>  
>  . /lib/init/initmethod-bbinit-functions.sh
> -. /lib/init/rc-once.sh
> +. /usr/lib/init/rc-once.sh
>  
>  do_start() {
>  	test -e "$STAMP" && return
> diff --git a/projectroot/usr/lib/systemd/systemd-rc-once b/projectroot/usr/lib/systemd/systemd-rc-once
> index db3d84e3c342..3ab5d75c5a3d 100644
> --- a/projectroot/usr/lib/systemd/systemd-rc-once
> +++ b/projectroot/usr/lib/systemd/systemd-rc-once
> @@ -1,7 +1,7 @@
>  #!/bin/sh
>  
>  . /lib/init/initmethod-bbinit-functions.sh
> -. /lib/init/rc-once.sh
> +. /usr/lib/init/rc-once.sh
>  
>  start() {
>  	if ! mount_root_rw; then

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ptxdist] [APPLIED] rc-once: Fix include path
  2021-08-27  8:33 ` [ptxdist] [PATCH 3/3] rc-once: Fix include path Alexander Dahl
@ 2021-10-07 10:18   ` Michael Olbrich
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Olbrich @ 2021-10-07 10:18 UTC (permalink / raw)
  To: ptxdist; +Cc: Alexander Dahl

Thanks, applied as bdb966cbd32716822ae7cb2350f8ce6de6849402.

Michael

[sent from post-receive hook]

On Thu, 07 Oct 2021 12:18:33 +0200, Alexander Dahl <ada@thorsis.com> wrote:
> The initmethod shell library was moved, but the include path in scripts
> using it, was not adapted back then.
> 
> Fixes: 5c7e5b48a39f ("initmethod: /usr merge")
> Signed-off-by: Alexander Dahl <ada@thorsis.com>
> Message-Id: <20210827083353.22152-4-ada@thorsis.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/projectroot/etc/init.d/rc-once b/projectroot/etc/init.d/rc-once
> index bf8473149cc2..e610254ef25a 100644
> --- a/projectroot/etc/init.d/rc-once
> +++ b/projectroot/etc/init.d/rc-once
> @@ -2,7 +2,7 @@
>  
>  PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
>  
> -. /lib/init/initmethod-bbinit-functions.sh
> +. /usr/lib/init/initmethod-bbinit-functions.sh
>  . /usr/lib/init/rc-once.sh
>  
>  do_start() {
> diff --git a/projectroot/usr/lib/systemd/systemd-rc-once b/projectroot/usr/lib/systemd/systemd-rc-once
> index 3ab5d75c5a3d..7dc9bf6f4b8d 100644
> --- a/projectroot/usr/lib/systemd/systemd-rc-once
> +++ b/projectroot/usr/lib/systemd/systemd-rc-once
> @@ -1,6 +1,6 @@
>  #!/bin/sh
>  
> -. /lib/init/initmethod-bbinit-functions.sh
> +. /usr/lib/init/initmethod-bbinit-functions.sh
>  . /usr/lib/init/rc-once.sh
>  
>  start() {

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-07 10:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27  8:33 [ptxdist] [PATCH 0/3] rc-once: Minor script cleanup Alexander Dahl
2021-08-27  8:33 ` [ptxdist] [PATCH 1/3] dropbear: Remove not needed include from init script Alexander Dahl
2021-10-07 10:18   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-08-27  8:33 ` [ptxdist] [PATCH 2/3] rc-once: Adapt path in scripts including shell lib Alexander Dahl
2021-10-07 10:18   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-08-27  8:33 ` [ptxdist] [PATCH 3/3] rc-once: Fix include path Alexander Dahl
2021-10-07 10:18   ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox