Skip to contentSkip to conversation

package/rng-tools: systemd: support extra options

PATCH New Benoît Thébaudeau 3 participants 4 messages Oct 20, 2015 – Nov 4, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/rng-tools: systemd: support extra options

Add a DAEMON_ARGS configuration variable in order to make it possible to pass custom extra options to rngd. This environment variable must defined in /etc/default/rngd if needed, like with the SysV init script. This file does not have to be present if not needed.

---
 package/rng-tools/rngd.service | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/rng-tools/rngd.service +2 -1
index 3bdc4c1..c0bcffe 100644
@@ -2,8 +2,9 @@
 Description=Hardware RNG Entropy Gatherer Daemon
 
 [Service]
-ExecStart=/usr/sbin/rngd -f
+ExecStart=/usr/sbin/rngd -f $DAEMON_ARGS
 SuccessExitStatus=66
+EnvironmentFile=-/etc/default/rngd
 
 [Install]
 WantedBy=multi-user.target
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 package/rng-tools: systemd: support extra options

Hi Benoit, all

Quoted 17 lines · Beno?t Th?baudeau

Add a DAEMON_ARGS configuration variable in order to make it possible to pass custom extra options to rngd. This environment variable must defined in /etc/default/rngd if needed, like with the SysV init script. This file does not have to be present if not needed.

---
 package/rng-tools/rngd.service | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/rng-tools/rngd.service +0 -0
index 3bdc4c1..c0bcffe 100644

package/rng-tools/rngd.service line 10

Quoted 10 lines
package/rng-tools/rngd.service +2 -1
@@ -2,8 +2,9 @@
 Description=Hardware RNG Entropy Gatherer Daemon
 
 [Service]
-ExecStart=/usr/sbin/rngd -f
+ExecStart=/usr/sbin/rngd -f $DAEMON_ARGS
 SuccessExitStatus=66
+EnvironmentFile=-/etc/default/rngd
 
 [Install]
 WantedBy=multi-user.target

Everything's fine by me on this patch, just a quick question, would it be nice to have a default file with an empty DAEMON_ARGS ? Maybe that would be easier for users to understand ? Since it's used by both init system.

Other than that
Reviewed-by "Maxime Hadjinlian <[email protected]>"

--

Quoted 6 lines

2.1.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20151104/816eec58/attachment.html>

#2 lore raw

PATCH 1/1 package/rng-tools: systemd: support extra options

Hi Maxime, all,

Quoted 2 lines · Maxime Hadjinlian

On Wed, Oct 21, 2015 at 12:43 AM, Beno?t Th?baudeau <[email protected]> wrote:

[...]

Quoted 14 lines
Quoted 14 lines
package/rng-tools/rngd.service +2 -1
index 3bdc4c1..c0bcffe 100644
@@ -2,8 +2,9 @@
 Description=Hardware RNG Entropy Gatherer Daemon
 
 [Service]
-ExecStart=/usr/sbin/rngd -f
+ExecStart=/usr/sbin/rngd -f $DAEMON_ARGS
 SuccessExitStatus=66
+EnvironmentFile=-/etc/default/rngd
 
Quoted 6 lines

package/rng-tools/rngd.service line 10

Quoted 2 lines
package/rng-tools/rngd.service +0 -0
 [Install]
 WantedBy=multi-user.target

Everything's fine by me on this patch, just a quick question, would it be nice to have a default file with an empty DAEMON_ARGS ? Maybe that would be easier for users to understand ? Since it's used by both init system.

The issue is that empty files lying around in Buildroot would be one more thing to maintain. They would also be useless apart from the implicit documentation aspect, because users wanting to put something in there would have to create their own file in a rootfs overlay. Buildroot's users are probably advanced enough to know where and what to look for if they need something.

Quoted 2 lines

Other than that
Reviewed-by "Maxime Hadjinlian <[email protected]>"

Thanks.

Best regards,
Beno?t

#3 lore raw

PATCH 1/1 package/rng-tools: systemd: support extra options

In reply to Benoît Thébaudeau

Dear Beno?t Th?baudeau,

Quoted 9 lines · Beno?t Th?baudeau

Add a DAEMON_ARGS configuration variable in order to make it possible to pass custom extra options to rngd. This environment variable must defined in /etc/default/rngd if needed, like with the SysV init script. This file does not have to be present if not needed.

---
 package/rng-tools/rngd.service | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com