[OE-core] [oe-core][rocko][sumo][master][PATCH 2/2] base-files: respect PERSISTENT_LOG_DIR

Khem Raj raj.khem at gmail.com
Sat Aug 25 00:16:57 UTC 2018


On Fri, Aug 17, 2018 at 6:00 PM Ankur Tyagi <ankur.tyagi85 at gmail.com> wrote:
>
> Respect PERSISTENT_LOG_DIR variable. In this way, if the user overrides
> this variable to be e.g "/home/root/log", /var/log on the final image would
> be a link pointing to /home/root/log on persistent storage.
>

I would suggest to stick with VOLATILE_BINDS

> Signed-off-by: Ankur Tyagi <ankur.tyagi85 at gmail.com>
> ---
>  meta/recipes-core/base-files/base-files_3.0.14.bb | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
> index 1c0863b..597fdaa 100644
> --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> @@ -42,7 +42,7 @@ dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
>             ${localstatedir}/backups ${localstatedir}/lib \
>             /sys ${localstatedir}/lib/misc ${localstatedir}/spool \
>             ${localstatedir}/volatile \
> -           ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log \
> +           ${@'${localstatedir}/volatile/log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else '${PERSISTENT_LOG_DIR}' if d.getVar('PERSISTENT_LOG_DIR') else '${localstatedir}/log' } \
>             /home ${prefix}/src ${localstatedir}/local \
>             /media"
>
> @@ -106,6 +106,10 @@ do_install () {
>                 ln -sf volatile/$d ${D}${localstatedir}/$d
>         done
>
> +       if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = False -a ! -z ${PERSISTENT_LOG_DIR} ]; then
> +               ln -sf ${PERSISTENT_LOG_DIR} ${D}/${localstatedir}/log
> +       fi
> +
>         ln -snf ../run ${D}${localstatedir}/run
>         ln -snf ../run/lock ${D}${localstatedir}/lock
>
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list