diff mbox

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

Message ID BD22328D0EB182418C2A0952DC2454F8791B931C@VMPREVAS1.prevas.se
State Not Applicable
Headers show

Commit Message

kim.hansen@prevas.dk Dec. 19, 2014, 9:47 a.m. UTC
deferring this until we have a proper hostapd recipe.

Mads, you could let yourself inspire by this patch :)

/Kim
diff mbox

Patch

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"