[PATCH 1/2] wpa_supplicant: Add systemd support
Henry Gebhardt
hsggebhardt
Tue Jul 12 13:04:35 PDT 2011
---
.../dbus/fi.epitest.hostap.WPASupplicant.service | 1 +
wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service | 1 +
.../systemd/wpa_supplicant-nl80211 at .service | 13 +++++++++++++
.../systemd/wpa_supplicant-wired at .service | 13 +++++++++++++
wpa_supplicant/systemd/wpa_supplicant.service | 11 +++++++++++
wpa_supplicant/systemd/wpa_supplicant at .service | 13 +++++++++++++
6 files changed, 52 insertions(+), 0 deletions(-)
create mode 100644 wpa_supplicant/systemd/wpa_supplicant-nl80211 at .service
create mode 100644 wpa_supplicant/systemd/wpa_supplicant-wired at .service
create mode 100644 wpa_supplicant/systemd/wpa_supplicant.service
create mode 100644 wpa_supplicant/systemd/wpa_supplicant at .service
diff --git a/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service b/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service
index a9ce1ec..2a2edc1 100644
--- a/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service
+++ b/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service
@@ -2,3 +2,4 @@
Name=fi.epitest.hostap.WPASupplicant
Exec=/sbin/wpa_supplicant -u
User=root
+SystemdService=wpa_supplicant.service
diff --git a/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service b/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service
index df78471..ff40621 100644
--- a/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service
+++ b/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service
@@ -2,3 +2,4 @@
Name=fi.w1.wpa_supplicant1
Exec=/sbin/wpa_supplicant -u
User=root
+SystemdService=wpa_supplicant.service
diff --git a/wpa_supplicant/systemd/wpa_supplicant-nl80211 at .service b/wpa_supplicant/systemd/wpa_supplicant-nl80211 at .service
new file mode 100644
index 0000000..04aa1ba
--- /dev/null
+++ b/wpa_supplicant/systemd/wpa_supplicant-nl80211 at .service
@@ -0,0 +1,13 @@
+[Unit]
+Description=WPA supplicant daemon (interface- and nl80211 driver-specific version)
+Requires=sys-subsystem-net-devices-%i.device
+After=sys-subsystem-net-devices-%i.device
+
+# NetworkManager users will probably want the dbus version instead.
+
+[Service]
+Type=simple
+ExecStart=/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-nl80211-%I.conf -Dnl80211 -i%I
+
+[Install]
+Alias=network.target.wants/wpa_supplicant-nl80211 at wlan0.service
diff --git a/wpa_supplicant/systemd/wpa_supplicant-wired at .service b/wpa_supplicant/systemd/wpa_supplicant-wired at .service
new file mode 100644
index 0000000..83f8c91
--- /dev/null
+++ b/wpa_supplicant/systemd/wpa_supplicant-wired at .service
@@ -0,0 +1,13 @@
+[Unit]
+Description=WPA supplicant daemon (interface- and wired driver-specific version)
+Requires=sys-subsystem-net-devices-%i.device
+After=sys-subsystem-net-devices-%i.device
+
+# NetworkManager users will probably want the dbus version instead.
+
+[Service]
+Type=simple
+ExecStart=/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-wired-%I.conf -Dwired -i%I
+
+[Install]
+Alias=network.target.wants/wpa_supplicant-wired at wlan0.service
diff --git a/wpa_supplicant/systemd/wpa_supplicant.service b/wpa_supplicant/systemd/wpa_supplicant.service
new file mode 100644
index 0000000..a9ab246
--- /dev/null
+++ b/wpa_supplicant/systemd/wpa_supplicant.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=WPA supplicant
+
+[Service]
+Type=dbus
+BusName=fi.epitest.hostap.WPASupplicant
+ExecStart=/sbin/wpa_supplicant -u
+
+[Install]
+WantedBy=network.target
+Alias=dbus-fi.epitest.hostap.WPASupplicant.service
diff --git a/wpa_supplicant/systemd/wpa_supplicant at .service b/wpa_supplicant/systemd/wpa_supplicant at .service
new file mode 100644
index 0000000..129dd1f
--- /dev/null
+++ b/wpa_supplicant/systemd/wpa_supplicant at .service
@@ -0,0 +1,13 @@
+[Unit]
+Description=WPA supplicant daemon (interface-specific version)
+Requires=sys-subsystem-net-devices-%i.device
+After=sys-subsystem-net-devices-%i.device
+
+# NetworkManager users will probably want the dbus version instead.
+
+[Service]
+Type=simple
+ExecStart=/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I
+
+[Install]
+Alias=network.target.wants/wpa_supplicant at wlan0.service
--
1.7.6
More information about the Hostap
mailing list