Some people choose a read-only file system. Thus /var/log is not writable.

However, some software expects to use the hard coded path of /var/log.


Thus, there's a symlink to the ramdisk to solve both problems.

________________________________
From: yocto-boun...@yoctoproject.org <yocto-boun...@yoctoproject.org> on behalf 
of Paul Knopf <pkn...@medxchange.com>
Sent: Monday, May 9, 2016 7:02 AM
To: yocto@yoctoproject.org
Subject: [yocto] Recipe that creates empty /var/log directory is auto-mounted 
to /var/volatile/log

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@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
pkn...@medxchange.com<mailto:pkn...@medxchange.com>
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to