[2/7] hostapd: Fixed installation of sysvinit script Changed hostapd.conf to template making it possible to install a custom version
diff mbox

Message ID 306593f12d169eb73498809ef60b927bcf3067b1.1411365801.git.kibo@prevas.dk
State Rejected
Delegated to: Kim
Headers show

Commit Message

Kim B√łndergaard Sept. 22, 2014, 6:09 a.m. UTC
From: Kim B√łndergaard <kim@fam-boendergaard.dk>

---
 recipes/hostapd/hostapd_1.0.oe | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Patch
diff mbox

diff --git a/recipes/hostapd/hostapd_1.0.oe b/recipes/hostapd/hostapd_1.0.oe
index 33d6e03..d21a697 100644
--- a/recipes/hostapd/hostapd_1.0.oe
+++ b/recipes/hostapd/hostapd_1.0.oe
@@ -8,7 +8,7 @@  SRC_URI += """
   file://wlan.patch
 """
 
-inherit c make
+inherit c make sysvinit
 
 LIBS = "libnl-3 libnl-genl-3 libssl libcrypto"
 DEPENDS += "${LIBS}"
@@ -19,16 +19,20 @@  S = "${SRCDIR}/hostapd-${PV}/hostapd"
 
 CFLAGS += "-I${HOST_SYSROOT}${includedir}/libnl3"
 
+RECIPE_FLAGS += "hostapd_sysvinit_start"
+DEFAULT_USE_hostapd_sysvinit_start = "98"
+
+
 do_configure() {
     install -m 0644 ${S}/defconfig ${S}/.config 
 }
 
 do_install() {
     install -d ${D}${sbindir} ${D}${sysconfdir}/init.d
-    install -m 0644 ${S}/hostapd.conf ${D}${sysconfdir}
+    install -m 0644 ${S}/hostapd.conf ${D}${sysconfdir}/hostapd.conf.template
     install -m 0755 ${S}/hostapd ${D}${sbindir}
     install -m 0755 ${S}/hostapd_cli ${D}${sbindir}
-    install -m 755 ${SRCDIR}/init ${D}${sysconfdir}/init.d/hostapd 
+    sysvinit_install_script ${SRCDIR}/init hostapd
 }
 
 PACKAGE =+ "${PN}-conf"