From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arne Fitzenreiter To: development@lists.ipfire.org Subject: Re: [PATCH] Suggested fix for 'rngd' service status Date: Wed, 12 Sep 2018 10:29:10 +0200 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2434715637710548353==" List-Id: --===============2434715637710548353== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This initskript needs a rewrite. It's on my todo list... With the new kernel /dev/hwrng always exists even if there is no hardware present, so there are more things to do. Normal rngd will startet by udev if it found hardware but it was not startet if only rdrand was there. So the script need to fix the pid's, check if rngd is already running and should only start it if rdrand was present and not already running... Arne On 2018-09-11 21:55, Peter M=C3=BCller wrote: > Hello, >=20 > I support this patch. Quite a while ago, there was a similar > one on this list but was not merged eventually. >=20 > Michael stated it should be fixed in the upstream channel (which > is basically right) - however, looking at our recent trouble > with this software, I doubt it makes much sense to delay this > until it reached the origin repository. >=20 > Best regards, > Peter M=C3=BCller >=20 >> Hi, >>=20 >> Since=20 >> https://git.ipfire.org/?p=3Dipfire-2.x.git;a=3Dcommitdiff;h=3Dfd0a0384f07b= 399e9cb4cf46b4c5722b809ffe6a >> 'rngd' is running again with much higher values. STATUS / ENTROPY=20 >> shows RUNNING. Thanks! ;-) >>=20 >> But '/var/run/rngd.pid' is created with wrong rights (0600).=20 >> Therefore, STATUS / SERVICES tells me >> 'rngd' is stopped. >>=20 >> The suggested fix checks whether '/var/run/rngd.pid' exists and sets=20 >> rights accordingly. >>=20 >> Best, >> Matthias >>=20 >> Signed-off-by: Matthias Fischer >> --- >> src/initscripts/system/rngd | 3 +++ >> 1 file changed, 3 insertions(+) >>=20 >> diff --git a/src/initscripts/system/rngd b/src/initscripts/system/rngd >> index 91b70a7b4..8fe5c9363 100644 >> --- a/src/initscripts/system/rngd >> +++ b/src/initscripts/system/rngd >> @@ -15,6 +15,9 @@ case "${1}" in >> start) >> boot_mesg "Starting Random Number Generator Daemon..." >> loadproc /usr/sbin/rngd --quiet >> + if [ -f "/var/run/rngd.pid" ]; then >> + chmod 644 /var/run/rngd.pid >> + fi >> ;; >>=20 >> stop) >>=20 --===============2434715637710548353==--