[OE-core] is it best practice to use ${sysconfdir} rather than hard-coding "/etc"?
Martin Jansa
martin.jansa at gmail.com
Sat Jun 30 13:29:35 UTC 2012
On Sat, Jun 30, 2012 at 09:25:57AM -0400, Robert P. J. Day 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.
using sysconfdir is better as someone can define it to different value
then 'etc' and the later will still work (be consistent across image)
Cheers,
>
> 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
--
Martin 'JaMa' Jansa jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20120630/5b3f9ee9/attachment-0002.sig>
More information about the Openembedded-core
mailing list