Bug 1197422

Summary: By default the rngd.service file does *NOT* read options from /etc/sysconfig like EL6 did
Product: Red Hat Enterprise Linux 7 Reporter: d. johnson <drjohnson1>
Component: rng-toolsAssignee: Neil Horman <nhorman>
Status: CLOSED NOTABUG QA Contact: Rachel Sibley <rasibley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-01 13:35:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.