Patchwork systemd: fix systemd interface alias

login
register
mail settings
Submitter Arend van Spriel
Date May 6, 2013, 9:54 a.m.
Message ID <1367834050-4463-1-git-send-email-arend@broadcom.com>
Download mbox | patch
Permalink /patch/241612/
State Accepted
Commit 893a0a558cd8fd9a7dc5827f379e0f8a273a4fe5
Headers show

Comments

Arend van Spriel - May 6, 2013, 9:54 a.m.
In the systemd interface templated the alias entry was specified
with wlan0 hard coded. Changing it to %i in this patch.

Reported-by: zg <ml@mail.tsaitgaist.info>
Signed-hostap: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in |    2 +-
 wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in   |    2 +-
 wpa_supplicant/systemd/wpa_supplicant.service.arg.in         |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Jouni Malinen - May 9, 2013, 8:29 a.m.
On Mon, May 06, 2013 at 11:54:10AM +0200, Arend van Spriel wrote:
> In the systemd interface templated the alias entry was specified
> with wlan0 hard coded. Changing it to %i in this patch.

Thanks, applied. The same change was proposed in
http://w1.fi/bugz/show_bug.cgi?id=477 but there are also some additional
recommendations there regarding use of WantedBy=multi-user.target and
BindsTo. Could someone familiar with systemd take a closer look at those
and prepare a patch if such changes were indeed helpful?

Patch

diff --git a/wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in b/wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in
index 76aba12..bfdee25 100644
--- a/wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in
+++ b/wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in
@@ -10,4 +10,4 @@  Type=simple
 ExecStart=@BINDIR@/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-nl80211-%I.conf -Dnl80211 -i%I
 
 [Install]
-Alias=multi-user.target.wants/wpa_supplicant-nl80211@wlan0.service
+Alias=multi-user.target.wants/wpa_supplicant-nl80211@%i.service
diff --git a/wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in b/wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in
index ff384ae..20ba0ad 100644
--- a/wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in
+++ b/wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in
@@ -10,4 +10,4 @@  Type=simple
 ExecStart=@BINDIR@/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-wired-%I.conf -Dwired -i%I
 
 [Install]
-Alias=multi-user.target.wants/wpa_supplicant-wired@wlan0.service
+Alias=multi-user.target.wants/wpa_supplicant-wired@%i.service
diff --git a/wpa_supplicant/systemd/wpa_supplicant.service.arg.in b/wpa_supplicant/systemd/wpa_supplicant.service.arg.in
index c215567..10e62bc 100644
--- a/wpa_supplicant/systemd/wpa_supplicant.service.arg.in
+++ b/wpa_supplicant/systemd/wpa_supplicant.service.arg.in
@@ -10,4 +10,4 @@  Type=simple
 ExecStart=@BINDIR@/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I
 
 [Install]
-Alias=multi-user.target.wants/wpa_supplicant@wlan0.service
+Alias=multi-user.target.wants/wpa_supplicant@%i.service