Control: tag -1 wontfix On Sun, 20 Jan 2019 at 16:12, Markus Wernig <pub...@wernig.net> wrote: > Package: hostapd > Version: 2:2.7-3 > Severity: normal > Tags: patch > > Dear Maintainer, > > * What led up to the situation? > I installed hostapd (first 2.6/testing, then 2.7/unstable) in a system > with 2 wireless cards. Added 2 configuration files, one for each > card. Added both files to DAEMON_CONF in /etc/default/hostapd: > DAEMON_CONF="/etc/hostapd/hostapd-wlp1s0.conf > /etc/hostapd/hostapd-wlp5s0.conf" > With this setting, hostapd does not start. > > * What exactly did you do (or not do) that was effective (or > ineffective)? > - systemctl restart hostapd > - /etc/init.d/hostapd restart > - reboot > > a Then I tried removing one file name from DAEMON_CONF. > b Then I tried starting hostapd manually from the command line: > #hostapd -B -P /run/hostapd.pid /etc/hostapd/hostapd-wlp1s0.conf > /etc/hostapd/hostapd-wlp5s0.conf > c Then I patched the systemd service file > /lib/systemd/system/hostapd.service > > * What was the outcome of this action? > - Normal start didn't work, systemctl reported a start failure (see > below). > > a With only one file name, hostapd started, but managed only one card. > b hostapd started normally when given the options on the command > line, and managed both cards. > > c Looking at /var/log/syslog, it became clear that something > (systemd) was passing the arguments to hostapd in the wrong way: > > Jan 20 15:27:53 debwall systemd[1]: Starting Advanced IEEE 802.11 AP and IEEE > 802.1X/WPA/WPA2/EAP Authenticator... > Jan 20 15:27:53 debwall hostapd[4468]: Configuration file: > /etc/hostapd/hostapd-wlp1s0.conf /etc/hostapd/hostapd-wlp5s0.conf > Jan 20 15:27:53 debwall hostapd[4468]: Could not open configuration file > '/etc/hostapd/hostapd-wlp1s0.conf /etc/hostapd/hostapd-wlp5s0.conf' for > reading. > Jan 20 15:27:53 debwall hostapd[4468]: Failed to set up interface with > /etc/hostapd/hostapd-wlp1s0.conf /etc/hostapd/hostapd-wlp5s0.conf > Jan 20 15:27:53 debwall hostapd[4468]: Failed to initialize interface > > I found the error in /lib/systemd/system/hostapd.service, which calls > hostapd like this: > > ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.pid -B $DAEMON_OPTS > ${DAEMON_CONF} > > This makes DAEMON_CONF a single string, which leads to the error > above. Removing the curly brackets solves the problem: > > ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.pid -B $DAEMON_OPTS > $DAEMON_CONF > > See also the attached patch file > > * What outcome did you expect instead? > hostapd should start and manage both cards.
Please use templated hostapd@ unit files. I will try to provide a migration path for this configuration in future. -- Cheers, Andrej