Skip to contentSkip to conversation

package/urandom-scripts: move seedrng init script to S01

PATCH Applied Peter Korsgaard 2 participants 3 messages Sep 30, 2023 – Oct 13, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/urandom-scripts: move seedrng init script to S01

We want to initialize the kernel random number generator as soon as possible, as early init scripts may also need random numbers (E.G. syslog-ng in S01syslog-ng does).

Seedrng was presumably only using S20 because the previos urandom script used S20, which (after som moves) dates all the way back to:

commit 8262508fc4456b5230216473ea14c897268ba791

Author: Eric Andersen <[email protected]>
Date:   Fri Apr 26 22:01:43 2002 +0000

With this update, everything now works as expected.
-Erik

Seedrng needs persistent storage, but mount -a is run before executing the init scripts, so S01 should be as good as S20 - Atleast with the scripts in upstream Buildroot.

---
 package/urandom-scripts/{S20seedrng => S01seedrng} | 0
 package/urandom-scripts/urandom-scripts.mk         | 4 ++--
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename package/urandom-scripts/{S20seedrng => S01seedrng} (100%)
package/urandom-scripts/S01seedrng renamed from package/urandom-scripts/S20seedrng +0 -0
similarity index 100%
rename from package/urandom-scripts/S20seedrng
rename to package/urandom-scripts/S01seedrng
package/urandom-scripts/urandom-scripts.mk +2 -2
index 32f3e09343..89abdfff72 100644
@@ -5,8 +5,8 @@
 ################################################################################
 
 define URANDOM_SCRIPTS_INSTALL_INIT_SYSV
-	$(INSTALL) -D -m 0755 $(URANDOM_SCRIPTS_PKGDIR)/S20seedrng \
-		$(TARGET_DIR)/etc/init.d/S20seedrng
+	$(INSTALL) -D -m 0755 $(URANDOM_SCRIPTS_PKGDIR)/S01seedrng \
+		$(TARGET_DIR)/etc/init.d/S01seedrng
 endef
 
 $(eval $(generic-package))
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Peter, All,

On 2023-09-30 15:42 +0200, Peter Korsgaard spake thusly:

Quoted 11 lines

We want to initialize the kernel random number generator as soon as possible, as early init scripts may also need random numbers (E.G. syslog-ng in S01syslog-ng does).

Seedrng was presumably only using S20 because the previos urandom script used S20, which (after som moves) dates all the way back to:

commit 8262508fc4456b5230216473ea14c897268ba791

Author: Eric Andersen <[email protected]>
Date:   Fri Apr 26 22:01:43 2002 +0000
Quoted 8 lines

With this update, everything now works as expected.
-Erik

Seedrng needs persistent storage, but mount -a is run before executing the init scripts, so S01 should be as good as S20 - Atleast with the scripts in upstream Buildroot.

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 32 lines
---
 package/urandom-scripts/{S20seedrng => S01seedrng} | 0
 package/urandom-scripts/urandom-scripts.mk         | 4 ++--
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename package/urandom-scripts/{S20seedrng => S01seedrng} (100%)
package/urandom-scripts/S01seedrng renamed from package/urandom-scripts/S20seedrng +0 -0
similarity index 100%
rename from package/urandom-scripts/S20seedrng
rename to package/urandom-scripts/S01seedrng
package/urandom-scripts/urandom-scripts.mk +2 -2
index 32f3e09343..89abdfff72 100644
@@ -5,8 +5,8 @@
 ################################################################################
 
 define URANDOM_SCRIPTS_INSTALL_INIT_SYSV
-	$(INSTALL) -D -m 0755 $(URANDOM_SCRIPTS_PKGDIR)/S20seedrng \
-		$(TARGET_DIR)/etc/init.d/S20seedrng
+	$(INSTALL) -D -m 0755 $(URANDOM_SCRIPTS_PKGDIR)/S01seedrng \
+		$(TARGET_DIR)/etc/init.d/S01seedrng
 endef
 
 $(eval $(generic-package))
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Peter Korsgaard
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

We want to initialize the kernel random number generator as soon as possible, as early init scripts may also need random numbers (E.G. syslog-ng in S01syslog-ng does).

Seedrng was presumably only using S20 because the previos urandom script used S20, which (after som moves) dates all the way back to:

commit 8262508fc4456b5230216473ea14c897268ba791

Author: Eric Andersen <[email protected]>
Date:   Fri Apr 26 22:01:43 2002 +0000
Quoted 8 lines

With this update, everything now works as expected.
-Erik

Seedrng needs persistent storage, but mount -a is run before executing the init scripts, so S01 should be as good as S20 - Atleast with the scripts in upstream Buildroot.

Committed to 2023.02.x and 2023.08.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot