Bug 1197422 - By default the rngd.service file does *NOT* read options from /etc/sysconfig like EL6 did
Summary: By default the rngd.service file does *NOT* read options from /etc/sysconfig ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rng-tools
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Neil Horman
QA Contact: Rachel Sibley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-01 04:41 UTC by d. johnson
Modified: 2015-03-02 18:53 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-01 13:35:15 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description d. johnson 2015-03-01 04:41:10 UTC
Description of problem:

EL6 read from /etc/sysconfig for options.  EL7 does not.

Version-Release number of selected component (if applicable):

rng-tools-4-5.el7.x86_64

How reproducible:

100%

Steps to Reproduce:
1. yum install rng-tools
2. note that /etc/sysconfig/rngd is missing.
3. populate /etc/sysconfig/rngd with info, and note that it is unused.

Actual results:

rngd loads without any environment set.

Expected results:

rngd in el7 behaves like el6.

Additional info:

Trivial fix.  Modify the .service file as follows:

$ cat rngd.service
[Unit]
Description=Hardware RNG Entropy Gatherer Daemon
 
[Service]
EnvironmentFile=-/etc/sysconfig/rngd
ExecStart=/sbin/rngd -f $EXTRAOPTIONS
 
[Install]
WantedBy=multi-user.target

$ sudo cat /etc/sysconfig/rngd
# Add extra options here
EXTRAOPTIONS=""

Comment 2 Neil Horman 2015-03-01 13:35:15 UTC
The EnvironmentFile isn't needed.  Since all the behvioral options are passed to rngd on the command line, you should just copy the rngd.service file to /etc/systemd/system/rngd.service and add the desired options directly to the ExecStart line in the unit file. It saves the indirection of an environment variable and is the recommended method for doing so.


Note You need to log in before you can comment on or make changes to this bug.