systemd: Update service files according to D-Bus interface version
systemd service files were supplied with old D-Bus bus name. After service activation systemd was waiting for appearance of specified bus name to consider it started successfully. However, if wpa_supplicant was compiled only with the new D-Bus interface name, systemd didn't notice configured (old) D-Bus bus name appearance. In the end, service was considered malfunctioning and it was deactivated. Update systemd service BusName property according to supported D-Bus interface version. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
This commit is contained in:
parent
ac7aea862f
commit
9e5a5de55a
2 changed files with 8 additions and 4 deletions
|
@ -1384,6 +1384,7 @@ ifndef DBUS_INCLUDE
|
||||||
DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1)
|
DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1)
|
||||||
endif
|
endif
|
||||||
DBUS_CFLAGS += $(DBUS_INCLUDE)
|
DBUS_CFLAGS += $(DBUS_INCLUDE)
|
||||||
|
DBUS_INTERFACE=fi.epitest.hostap.WPASupplicant
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_CTRL_IFACE_DBUS_NEW
|
ifdef CONFIG_CTRL_IFACE_DBUS_NEW
|
||||||
|
@ -1409,6 +1410,7 @@ DBUS_OBJS += dbus/dbus_new_introspect.o
|
||||||
DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
|
DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
|
||||||
endif
|
endif
|
||||||
DBUS_CFLAGS += $(DBUS_INCLUDE)
|
DBUS_CFLAGS += $(DBUS_INCLUDE)
|
||||||
|
DBUS_INTERFACE=fi.w1.wpa_supplicant1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef DBUS
|
ifdef DBUS
|
||||||
|
@ -1771,11 +1773,13 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
%.service: %.service.in
|
%.service: %.service.in
|
||||||
$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
|
$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' \
|
||||||
|
-e 's|\@DBUS_INTERFACE\@|$(DBUS_INTERFACE)|g' $< >$@
|
||||||
@$(E) " sed" $<
|
@$(E) " sed" $<
|
||||||
|
|
||||||
%@.service: %.service.arg.in
|
%@.service: %.service.arg.in
|
||||||
$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
|
$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' \
|
||||||
|
-e 's|\@DBUS_INTERFACE\@|$(DBUS_INTERFACE)|g' $< >$@
|
||||||
@$(E) " sed" $<
|
@$(E) " sed" $<
|
||||||
|
|
||||||
wpa_supplicant.exe: wpa_supplicant
|
wpa_supplicant.exe: wpa_supplicant
|
||||||
|
|
|
@ -5,9 +5,9 @@ Wants=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=dbus
|
Type=dbus
|
||||||
BusName=fi.epitest.hostap.WPASupplicant
|
BusName=@DBUS_INTERFACE@
|
||||||
ExecStart=@BINDIR@/wpa_supplicant -u
|
ExecStart=@BINDIR@/wpa_supplicant -u
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
Alias=dbus-fi.epitest.hostap.WPASupplicant.service
|
Alias=dbus-@DBUS_INTERFACE@.service
|
||||||
|
|
Loading…
Reference in a new issue