[yocto] Removing hostapd init file
Uwe Geuder
jrswdnan22 at snkmail.com
Thu Nov 1 03:06:44 PDT 2018
On Tue, Oct 23, 2018 at 9:14 AM Kristupas Savickas kristupas.savickas-at-teltonika.lt wrote:
>
> Greetings,
>
> I'm trying to remove the hostapd init file as I'll handle startup of it on my own. I've created a .bbappend file in my layer to do this:
>
> do_install_append() {
> rm -rf ${D}${sysconfdir}/init.d
> }
>
> However, this results in a compilation warning when building my image
> and the ipk-postinst is still being run on my target:
[...]
> I tried setting INITSCRIPT_NAME to "" in my .bbappend, but it fails
> with an error during do_rootfs task of my image:
[...]
I guess the problem is that the recipe inherits update-rc.d class and
that class wants to work with the init script. Unfortunately
uninheriting a class in a bbappend is not possible AFAIK. I am not
familiar with the details of the class whether there is a way to tell it
to do nothing.
> Any pointers of how I could accomplish my goal?
>
What about
do_install_append() {
(echo "#!/bin/sh" ; echo true) > ${D}${sysconfdir}/init.d/hostapd
}
Just guessing. Untested and I have not worked with sysv init for
years... Maybe update-rc.d requires the typcial comment section at the
beginning. If so you just add it.
Or actually if update-rc.d refers to the comment section in the
beginning of the script you could add a patch that changes the
Default-Start: value to empty (or some runlevel you do not use).
Regards,
Uwe Geuder
Neuro Event Labs Oy
Tampere, Finland
uwe.gexder at neuroeventlabs.com (Bot check: fix one obvious typo)
More information about the yocto
mailing list