[yocto] Recipe that creates empty /var/log directory is auto-mounted to /var/volatile/log

Paul Knopf pknopf at medxchange.com
Mon May 9 07:02:28 PDT 2016


I have a simple recipe that places files on the system.

-------------
do_install() {
  # create this directory, because our "normal" fstab file will mount a log
partition to it.
  install -d ${D}/var/log
  install -d ${D}${sysconfdir}
  install -m 0644 ${WORKDIR}/fstab-normal ${D}${sysconfdir}/fstab
}
-------------

The fstab-normal file has an entry that mounts a partition to this created
/var/log directory.

-------------
/dev/mmcblk0p3       /var/log             auto       defaults  0  0
-------------

However, when the package get's created, /var/log gets pointed to
/var/volatile/log. Where is this happening, and why?

-------------
pknopf at ubuntu:~/Git/recipes/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/base-files-fstab-normal/1.0-r0/package$
tree
.
├── etc
│   └── fstab
└── var
    ├── log -> volatile/log
    └── volatile
        └── log

-------------

Thanks,
Paul Knopf
Software Engineer
Med X Change, Inc
pknopf at medxchange.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160509/7e382649/attachment.html>


More information about the yocto mailing list