Add init fragment for hostapd on Android
This fragment defines how the Android init system should start hostapd
as a standalone service. Previously, hostapd was fork/exec'd from
Android's netd. This left hostapd with some dangling file descriptors
and a process parent minimally interested in acting as init for child
processes.
Bug: 30041118
Change-Id: Ic25dbb52d0c3b437c8ae282e3c8253220ff7550b
Signed-off-by: Christopher Wiley <wiley@google.com>
diff --git a/hostapd/Android.mk b/hostapd/Android.mk
index c7467fd..de37def 100644
--- a/hostapd/Android.mk
+++ b/hostapd/Android.mk
@@ -992,6 +992,7 @@
LOCAL_CFLAGS := $(L_CFLAGS)
LOCAL_SRC_FILES := $(OBJS)
LOCAL_C_INCLUDES := $(INCLUDES)
+LOCAL_INIT_RC := hostapd.android.rc
include $(BUILD_EXECUTABLE)
endif # ifeq ($(WPA_BUILD_HOSTAPD),true)