diff options
| -rw-r--r-- | documentation/ref-manual/classes.rst | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index 9b1ead66b3..5bc4472e34 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst | |||
| @@ -1742,7 +1742,8 @@ Then you can specify writable directories on a recipe basis (e.g. in my-applicat | |||
| 1742 | 1742 | ||
| 1743 | To support several mount points you can use a different variable flag. Assuming we | 1743 | To support several mount points you can use a different variable flag. Assuming we |
| 1744 | want to have a writable location on the file system, but do not need that the data | 1744 | want to have a writable location on the file system, but do not need that the data |
| 1745 | survives a reboot, then we could have a ``mnt-overlay.mount`` unit for a ``tmpfs`` file system. | 1745 | survives a reboot, then we could have a ``mnt-overlay.mount`` unit for a ``tmpfs`` |
| 1746 | file system. | ||
| 1746 | 1747 | ||
| 1747 | In your machine configuration:: | 1748 | In your machine configuration:: |
| 1748 | 1749 | ||
| @@ -1752,6 +1753,19 @@ and then in your recipe:: | |||
| 1752 | 1753 | ||
| 1753 | OVERLAYFS_WRITABLE_PATHS[mnt-overlay] = "/usr/share/another-application" | 1754 | OVERLAYFS_WRITABLE_PATHS[mnt-overlay] = "/usr/share/another-application" |
| 1754 | 1755 | ||
| 1756 | On a practical note, your application recipe might require multiple | ||
| 1757 | overlays to be mounted before running to avoid writing to the underlying | ||
| 1758 | file system (which can be forbidden in case of read-only file system) | ||
| 1759 | To achieve that :ref:`overlayfs <ref-classes-overlayfs>` provides a ``systemd`` | ||
| 1760 | helper service for mounting overlays. This helper service is named | ||
| 1761 | ``${PN}-overlays.service`` and can be depended on in your application recipe | ||
| 1762 | (named ``application`` in the following example) ``systemd`` unit by adding | ||
| 1763 | to the unit the following:: | ||
| 1764 | |||
| 1765 | [Unit] | ||
| 1766 | After=application-overlays.service | ||
| 1767 | Requires=application-overlays.service | ||
| 1768 | |||
| 1755 | .. note:: | 1769 | .. note:: |
| 1756 | 1770 | ||
| 1757 | The class does not support the ``/etc`` directory itself, because ``systemd`` depends on it. | 1771 | The class does not support the ``/etc`` directory itself, because ``systemd`` depends on it. |
