Bug 1353138

Summary: „-f /var/log/wpa_supplicant.log” option appears two times on the command line for wpa_supplicant
Product: Red Hat Enterprise Linux 7 Reporter: Steffen Froemer <sfroemer>
Component: wpa_supplicantAssignee: Davide Caratti <dcaratti>
Status: CLOSED ERRATA QA Contact: Ken Benoit <kbenoit>
Severity: low Docs Contact:
Priority: medium    
Version: 7.2CC: dcaratti, mleitner, ohudlick, sfroemer, vanhoof, xzhou
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
: 1409480 (view as bug list) Environment:
Last Closed: 2017-08-01 20:58:59 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:
Bug Depends On:    
Bug Blocks: 1203710, 1393481, 1409480    

Description Steffen Froemer 2016-07-06 08:30:45 UTC
Description of problem:
The option „-f /var/log/wpa_supplicant.log” appears two time on the commandline of wpa_supplicant. 
It is defined twice. First in /etc/sysconfig/wpa_supplicant and second in /usr/lib/systemd/system/wpa_supplicant.service

Version-Release number of selected component (if applicable):
wpa_supplicant-2.0-17.el7_1.x86_64

How reproducible:
always

Steps to Reproduce:
1. yum install wpa_supplicant
2. systemctl start wpa_supplicant
3. ps -ef | grep [w]pa_supplicant

Actual results:
root      1277     1  0 06:49 ?        00:00:00 /usr/sbin/wpa_supplicant -u -f /var/log/wpa_supplicant.log -c /etc/wpa_supplicant/wpa_supplicant.conf -u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid

Expected results:
root      1277     1  0 06:49 ?        00:00:00 /usr/sbin/wpa_supplicant -u -f /var/log/wpa_supplicant.log -c /etc/wpa_supplicant/wpa_supplicant.conf -P /var/run/wpa_supplicant.pid

Additional info:

$: cat /etc/sysconfig/wpa_supplicant 
# Use the flag "-i" before each of your interfaces, like so:
#  INTERFACES="-ieth1 -iwlan0"
INTERFACES=""

# Use the flag "-D" before each driver, like so:
#  DRIVERS="-Dwext"
DRIVERS=""

# Other arguments
#   -u   Enable the D-Bus interface (required for use with NetworkManager)
#   -f   Log to /var/log/wpa_supplicant.log
#   -P   Write pid file to /var/run/wpa_supplicant.pid 
#        required to return proper codes by init scripts (e.g. double "start" action)
#        -B to daemonize that has to be used together with -P is already in wpa_supplicant.init.d
OTHER_ARGS="-u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid"


---

$: cat /usr/lib/systemd/system/wpa_supplicant.service 
[Unit]
Description=WPA Supplicant daemon
Before=network.target
After=syslog.target

[Service]
Type=dbus
BusName=fi.w1.wpa_supplicant1
EnvironmentFile=-/etc/sysconfig/wpa_supplicant
ExecStart=/usr/sbin/wpa_supplicant -u -f /var/log/wpa_supplicant.log -c /etc/wpa_supplicant/wpa_supplicant.conf $INTERFACES $DRIVERS $OTHER_ARGS

[Install]
WantedBy=multi-user.target

Comment 23 Ken Benoit 2017-04-25 15:30:00 UTC
Installed RHEL-7.4-20170424.n.1 on a test system. Verified that /etc/sysconfig/wpa_supplicant now only contains:

OTHER_ARGS="-P /var/run/wpa_supplicant.pid"

While /usr/lib/systemd/system/wpa_supplicant.service contains:

ExecStart=/usr/sbin/wpa_supplicant -u -f /var/log/wpa_supplicant.log -c /etc/wpa_supplicant/wpa_supplicant.conf $INTERFACES $DRIVERS $OTHER_ARGS

Marking as verified.

Comment 24 errata-xmlrpc 2017-08-01 20:58:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2053