summaryrefslogtreecommitdiffstats
path: root/package/rng-tools/0001-rngd-exit-code.patch
diff options
context:
space:
mode:
authorMaxim Mikityanskiy <maxtram95@gmail.com>2015-01-19 18:14:16 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-04-22 22:07:26 +0200
commit22cb51e1a2cdff07f220d7519d05934f6ce1bf2c (patch)
treea90851e182682ec501d2b039a875825295a1abec /package/rng-tools/0001-rngd-exit-code.patch
parentd3230923e62f57cdefa90b5ffb9760f39c94718e (diff)
downloadbuildroot-22cb51e1a2cdff07f220d7519d05934f6ce1bf2c.tar.gz
buildroot-22cb51e1a2cdff07f220d7519d05934f6ce1bf2c.zip
package/rng-tools: add systemd support for rngd
Add rngd.service for systemd. Also patch rngd with patch from Fedora to ignore failure if no hwrng present: https://bugzilla.redhat.com/show_bug.cgi?id=892178 [Thomas: - rename patch to the proper naming convention - add description and SoB to patch - install service file to /usr/lib/systemd and not /lib/systemd - use a relative symbolic link instead of an absolute one] Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/rng-tools/0001-rngd-exit-code.patch')
-rw-r--r--package/rng-tools/0001-rngd-exit-code.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/package/rng-tools/0001-rngd-exit-code.patch b/package/rng-tools/0001-rngd-exit-code.patch
new file mode 100644
index 0000000000..709e20c70d
--- /dev/null
+++ b/package/rng-tools/0001-rngd-exit-code.patch
@@ -0,0 +1,22 @@
+Exit with a special value when RNG modules are not available
+
+Instead of returning with an error, exit with a special value when the
+RNG kernel modules are not present in the kernel. This is not really a
+hard failure.
+
+Patch borrowed from Fedora, at
+http://pkgs.fedoraproject.org/cgit/rng-tools.git/tree/rngd-exit-code.patch.
+
+Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
+
+--- a/rngd.c
++++ b/rngd.c
+@@ -319,7 +319,7 @@ int main(int argc, char **argv)
+ message(LOG_DAEMON|LOG_ERR,
+ "Maybe RNG device modules are not loaded\n");
+ }
+- return 1;
++ return 66;
+ }
+
+ if (arguments->verbose) {
OpenPOWER on IntegriCloud