package/rng-tools: systemd: support extra options
authorBenoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Tue, 20 Oct 2015 22:43:28 +0000 (00:43 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 4 Nov 2015 20:50:24 +0000 (21:50 +0100)
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.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Reviewed-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/rng-tools/rngd.service

index 3bdc4c11a7ae980cb7ab507d1d8cd4eb20ef0823..c0bcffe59e65fe4c93f5c576b9a5c04d19b42c24 100644 (file)
@@ -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