mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-05-19 00:58:35 +00:00
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>
This commit is contained in:
parent
ffe0b3cc75
commit
8f09c03e47
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/hostapd.pid
|
||||
ExecStart=@SBINDIR@/hostapd @SYSCONFDIR@/hostapd.conf -P /run/hostapd.pid -B
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@ -5,9 +5,11 @@ LIC_FILES_CHKSUM = "file://README;md5=0854a4da34ac3990770794d771fac7fd"
|
||||
DEPENDS = "libnl openssl"
|
||||
SUMMARY = "User space daemon for extended IEEE 802.11 management"
|
||||
|
||||
inherit update-rc.d
|
||||
inherit update-rc.d systemd
|
||||
INITSCRIPT_NAME = "hostapd"
|
||||
|
||||
SYSTEMD_PACKAGES = "hostapd"
|
||||
SYSTEMD_SERVICE_hostapd = "hostapd.service"
|
||||
SYSTEMD_AUTO_ENABLE_hostapd = "disable"
|
||||
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
@ -15,6 +17,7 @@ SRC_URI = " \
|
||||
http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz \
|
||||
file://defconfig \
|
||||
file://init \
|
||||
file://hostapd.service \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/hostapd-${PV}/hostapd"
|
||||
@ -30,11 +33,13 @@ do_compile() {
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${sbindir} ${D}${sysconfdir}/init.d
|
||||
install -d ${D}${sbindir} ${D}${sysconfdir}/init.d ${D}${systemd_unitdir}/system/
|
||||
install -m 0644 ${S}/hostapd.conf ${D}${sysconfdir}
|
||||
install -m 0755 ${S}/hostapd ${D}${sbindir}
|
||||
install -m 0755 ${S}/hostapd_cli ${D}${sbindir}
|
||||
install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hostapd
|
||||
install -m 0644 ${WORKDIR}/hostapd.service ${D}${systemd_unitdir}/system/
|
||||
sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/hostapd.service
|
||||
}
|
||||
|
||||
CONFFILES_${PN} += "${sysconfdir}/hostapd.conf"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user