* Recipe that creates empty /var/log directory is auto-mounted to /var/volatile/log
@ 2016-05-09 14:02 Paul Knopf
2016-05-09 15:17 ` Randle, William C
2016-05-09 15:32 ` Fred Ollinger
0 siblings, 2 replies; 3+ messages in thread
From: Paul Knopf @ 2016-05-09 14:02 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]
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
pknopf@medxchange.com
[-- Attachment #2: Type: text/html, Size: 1615 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Recipe that creates empty /var/log directory is auto-mounted to /var/volatile/log
2016-05-09 14:02 Recipe that creates empty /var/log directory is auto-mounted to /var/volatile/log Paul Knopf
@ 2016-05-09 15:17 ` Randle, William C
2016-05-09 15:32 ` Fred Ollinger
1 sibling, 0 replies; 3+ messages in thread
From: Randle, William C @ 2016-05-09 15:17 UTC (permalink / raw)
To: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 1497 bytes --]
It happens in meta/recipes-core/initscripts. I don't know the history behind it, but the OE convention is to use /var/volatile, I believe mainly so that /var/volatile could be a RAMFS.
-Bill
On Mon, 2016-05-09 at 10:02 -0400, Paul Knopf wrote:
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
pknopf@medxchange.com<mailto:pknopf@medxchange.com>
--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>
https://lists.yoctoproject.org/listinfo/yocto
[-- Attachment #2: Type: text/html, Size: 2653 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Recipe that creates empty /var/log directory is auto-mounted to /var/volatile/log
2016-05-09 14:02 Recipe that creates empty /var/log directory is auto-mounted to /var/volatile/log Paul Knopf
2016-05-09 15:17 ` Randle, William C
@ 2016-05-09 15:32 ` Fred Ollinger
1 sibling, 0 replies; 3+ messages in thread
From: Fred Ollinger @ 2016-05-09 15:32 UTC (permalink / raw)
To: Paul Knopf, yocto@yoctoproject.org
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-bounces@yoctoproject.org <yocto-bounces@yoctoproject.org> on behalf of Paul Knopf <pknopf@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
pknopf@medxchange.com<mailto:pknopf@medxchange.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-09 15:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-09 14:02 Recipe that creates empty /var/log directory is auto-mounted to /var/volatile/log Paul Knopf
2016-05-09 15:17 ` Randle, William C
2016-05-09 15:32 ` Fred Ollinger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.