summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity/hostapd
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-08-15 01:35:51 -0400
committerMartin Jansa <Martin.Jansa@gmail.com>2014-08-21 21:35:05 +0200
commit8f09c03e478d285c344177eef7090560f60e0fcc (patch)
treef2b758f224afa01c2c9ad0a7e826600dde45a623 /meta-oe/recipes-connectivity/hostapd
parentffe0b3cc750eaba6f8608a0ee8deca49f3d7d524 (diff)
downloadmeta-openembedded-8f09c03e478d285c344177eef7090560f60e0fcc.tar.gz
hostapd: add systemd support
Add hostapd.service file. The file mostly comes from Fedora20. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-connectivity/hostapd')
-rw-r--r--meta-oe/recipes-connectivity/hostapd/hostapd-2.2/hostapd.service11
-rw-r--r--meta-oe/recipes-connectivity/hostapd/hostapd_2.2.bb11
2 files changed, 19 insertions, 3 deletions
diff --git a/meta-oe/recipes-connectivity/hostapd/hostapd-2.2/hostapd.service b/meta-oe/recipes-connectivity/hostapd/hostapd-2.2/hostapd.service
new file mode 100644
index 000000000..151c0504f
--- /dev/null
+++ b/meta-oe/recipes-connectivity/hostapd/hostapd-2.2/hostapd.service
@@ -0,0 +1,11 @@
1[Unit]
2Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
3After=network.target
4
5[Service]
6Type=forking
7PIDFile=/run/hostapd.pid
8ExecStart=@SBINDIR@/hostapd @SYSCONFDIR@/hostapd.conf -P /run/hostapd.pid -B
9
10[Install]
11WantedBy=multi-user.target
diff --git a/meta-oe/recipes-connectivity/hostapd/hostapd_2.2.bb b/meta-oe/recipes-connectivity/hostapd/hostapd_2.2.bb
index d0d9df986..f1c6b3a80 100644
--- a/meta-oe/recipes-connectivity/hostapd/hostapd_2.2.bb
+++ b/meta-oe/recipes-connectivity/hostapd/hostapd_2.2.bb
@@ -5,9 +5,11 @@ LIC_FILES_CHKSUM = "file://README;md5=0854a4da34ac3990770794d771fac7fd"
5DEPENDS = "libnl openssl" 5DEPENDS = "libnl openssl"
6SUMMARY = "User space daemon for extended IEEE 802.11 management" 6SUMMARY = "User space daemon for extended IEEE 802.11 management"
7 7
8inherit update-rc.d 8inherit update-rc.d systemd
9INITSCRIPT_NAME = "hostapd" 9INITSCRIPT_NAME = "hostapd"
10 10SYSTEMD_PACKAGES = "hostapd"
11SYSTEMD_SERVICE_hostapd = "hostapd.service"
12SYSTEMD_AUTO_ENABLE_hostapd = "disable"
11 13
12DEFAULT_PREFERENCE = "-1" 14DEFAULT_PREFERENCE = "-1"
13 15
@@ -15,6 +17,7 @@ SRC_URI = " \
15 http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz \ 17 http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz \
16 file://defconfig \ 18 file://defconfig \
17 file://init \ 19 file://init \
20 file://hostapd.service \
18" 21"
19 22
20S = "${WORKDIR}/hostapd-${PV}/hostapd" 23S = "${WORKDIR}/hostapd-${PV}/hostapd"
@@ -30,11 +33,13 @@ do_compile() {
30} 33}
31 34
32do_install() { 35do_install() {
33 install -d ${D}${sbindir} ${D}${sysconfdir}/init.d 36 install -d ${D}${sbindir} ${D}${sysconfdir}/init.d ${D}${systemd_unitdir}/system/
34 install -m 0644 ${S}/hostapd.conf ${D}${sysconfdir} 37 install -m 0644 ${S}/hostapd.conf ${D}${sysconfdir}
35 install -m 0755 ${S}/hostapd ${D}${sbindir} 38 install -m 0755 ${S}/hostapd ${D}${sbindir}
36 install -m 0755 ${S}/hostapd_cli ${D}${sbindir} 39 install -m 0755 ${S}/hostapd_cli ${D}${sbindir}
37 install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hostapd 40 install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hostapd
41 install -m 0644 ${WORKDIR}/hostapd.service ${D}${systemd_unitdir}/system/
42 sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/hostapd.service
38} 43}
39 44
40CONFFILES_${PN} += "${sysconfdir}/hostapd.conf" 45CONFFILES_${PN} += "${sysconfdir}/hostapd.conf"