[OE-core] is it best practice to use ${sysconfdir} rather than hard-coding "/etc"?

Andrei Gherzan andrei at gherzan.ro
Sat Jun 30 14:34:55 UTC 2012


As a general rule is it better to use any "path variable" instead of a
hard-coded one.

@g

On Sat, Jun 30, 2012 at 4:25 PM, Robert P. J. Day <rpjday at crashcourse.ca>wrote:

>
>  i suspect i know the answer to this, but in the recipe file
> usbinit.bb, we have:
>
> do_install() {
>    install -d ${D}/etc
>    install -d ${D}/etc/init.d
>    install usb-gether ${D}/etc/init.d
> }
>
>  i'm guessing that would more properly be coded:
>
> do_install() {
>    install -d ${D}${sysconfdir}
>    install -d ${D}${sysconfdir}/init.d
>    install usb-gether ${D}${sysconfdir}/init.d
> }
>
>  the end result is functionally identical, of course, it's all just a
> matter of style.
>
> rday
>
> --
>
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                        http://crashcourse.ca
>
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20120630/178638ca/attachment-0002.html>


More information about the Openembedded-core mailing list