[yocto] How to install 2 or more initscrips out form one recipe?

Jussi Kukkonen jussi.kukkonen at intel.com
Fri Jul 8 12:18:20 PDT 2016


On 8 July 2016 at 16:57, <S.Jaritz at esa-grimma.de> wrote:

> Hej
>
> I run into a problem when I tried to install 3 initscrips out of one
> recipe. My recipe looks like:
> #############
> SUMMARY = "demo cfg"
> SECTION = "demo"
> LICENSE = "CLOSED"
>
> inherit update-rc.d
>
> RDEPENDS_${PN} = "bash initscripts"
>
> SRC_URI = "file://startA \
>         file://startB \
>         file://startC \
>         "
>
> S = "${WORKDIR}"
>
> do_install () {
>         install -d ${D}${sysconfdir}/
>         install -d ${D}${sysconfdir}/init.d/
>         install -m 0644 ${S}/startA ${D}${sysconfdir}/init.d/startA
>         install -m 0644 ${S}/startB ${D}${sysconfdir}/init.d/startB
>         install -m 0644 ${S}/startC ${D}${sysconfdir}/init.d/startC
>
>         chmod a+x ${D}${sysconfdir}/init.d/startA
>         chmod a+x ${D}${sysconfdir}/init.d/startB
>         chmod a+x ${D}${sysconfdir}/init.d/startC
> }
>
> INITSCRIPT_PACKAGES = "${PN} ${PN}_B ${PN}_C"

INITSCRIPT_NAME_${PN} = "startA"
> INITSCRIPT_PARAMS_${PN} = "start 90 10"
> INITSCRIPT_NAME_${PN}_B   = "startB"
> INITSCRIPT_PARAMS_${PN}_B = "start 90 10"
> INITSCRIPT_NAME_${PN}_C   = "startC"
> INITSCRIPT_PARAMS_${PN}_C = "start 90 10"
>
> CONFFILES_${PN} += "${sysconfdir}/init.d/startA"
> CONFFILES_${PN} += "${sysconfdir}/init.d/startB"
> CONFFILES_${PN} += "${sysconfdir}/init.d/startC"
>
> FILES_${PN} += "${sysconfdir}/*"
>

This puts all the init scripts in ${PN} when each should go into their own
package. You'll also probably need to make sure the extra packages are
created:
    PACKAGES =+ "${PN}_B ${PN}_C"
Check packages-split/-directory in WORKDIR to make sure all the files went
to the right place.

As a style comment: Underscore probably works in a package name but hyphen
("${PN}-B") is the common choice.

Jussi


#############
>
> The do_install works but initscript does not generates the link. I build
> that after this document
> http://docs.openembedded.ru/update-rc-d_class.html.
>
> Any ideas?
>
> Regards!
>
> Stefan Jaritz
>
>
> ------------------------------------------------------------
> ESA Elektroschaltanlagen Grimma GmbH
> Broner Ring 30
> 04668 Grimma
> Telefon: +49 3437 9211 176
> Telefax: +49 3437 9211 26
> E-Mail: s.jaritz at esa-grimma.de
> Internet: www.esa-grimma.de
>
>
> Geschäftsführer:
> Dipl.-Ing. Jörg Gaitzsch
> Jörg Reinker
>
> Sitz der Gesellschaft: Grimma
> Ust.-ID: DE 141784437
> Amtsgericht: Leipzig, HRB 5159
> Steuernummer: 238/108/00755
>
>
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> Informationen.
> Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich
> erhalten
> haben, informieren Sie bitte sofort den Absender und löschen Sie diese
> Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser
> Mail
> ist nicht gestattet.
>
> This e-mail may contain confidential and/or privileged information. If you
> are
> not the intended recipient (or have received this e-mail in error) please
> notify the sender immediately and destroy this e-mail. Any unauthorized
> copying, disclosure or distribution of the material in this e-mail is
> strictly
> forbidden.
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160708/69bec3d4/attachment.html>


More information about the yocto mailing list