systemd: Order wpa_supplicant before network.target

Ordering the units before network.target causes them to be stopped
after network.target on shutdown. This ensures that any network
filesystems will be unmounted before wpa_supplicant is killed.

Adding Wants=network.target ensures that network.target will be included
in the active dependency graph. This is typical of units which are
involved in networking setup functions.

Signed-off-by: Mike Gilbert <floppym@gentoo.org>
This commit is contained in:
Mike Gilbert 2015-08-12 10:44:42 -04:00 committed by Jouni Malinen
parent 6b86872a7c
commit cda3a40fce
4 changed files with 8 additions and 0 deletions

View file

@ -2,6 +2,8 @@
Description=WPA supplicant daemon (interface- and nl80211 driver-specific version) Description=WPA supplicant daemon (interface- and nl80211 driver-specific version)
Requires=sys-subsystem-net-devices-%i.device Requires=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device After=sys-subsystem-net-devices-%i.device
Before=network.target
Wants=network.target
# NetworkManager users will probably want the dbus version instead. # NetworkManager users will probably want the dbus version instead.

View file

@ -2,6 +2,8 @@
Description=WPA supplicant daemon (interface- and wired driver-specific version) Description=WPA supplicant daemon (interface- and wired driver-specific version)
Requires=sys-subsystem-net-devices-%i.device Requires=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device After=sys-subsystem-net-devices-%i.device
Before=network.target
Wants=network.target
# NetworkManager users will probably want the dbus version instead. # NetworkManager users will probably want the dbus version instead.

View file

@ -2,6 +2,8 @@
Description=WPA supplicant daemon (interface-specific version) Description=WPA supplicant daemon (interface-specific version)
Requires=sys-subsystem-net-devices-%i.device Requires=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device After=sys-subsystem-net-devices-%i.device
Before=network.target
Wants=network.target
# NetworkManager users will probably want the dbus version instead. # NetworkManager users will probably want the dbus version instead.

View file

@ -1,5 +1,7 @@
[Unit] [Unit]
Description=WPA supplicant Description=WPA supplicant
Before=network.target
Wants=network.target
[Service] [Service]
Type=dbus Type=dbus