Skip to content

Commit 0487bb9

Browse files
authored
Merge pull request #1073 from cgwalters/etc-more
docs/filesystem: Flesh out `etc` a bit more
2 parents 5433b30 + 752de7f commit 0487bb9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/src/filesystem.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ in derived builds.
7070
## `/etc`
7171

7272
The `/etc` directory contains mutable persistent state by default; however,
73-
it is suppported to enable the [`etc.transient` config option](https://ostreedev.github.io/ostree/man/ostree-prepare-root.html),
73+
it is suppported (and encouraged) to enable the [`etc.transient` config option](https://ostreedev.github.io/ostree/man/ostree-prepare-root.html),
7474
see below as well.
7575

7676
When in persistent mode, it inherits the OSTree semantics of [performing a 3-way merge](https://ostreedev.github.io/ostree/atomic-upgrades/#assembling-a-new-deployment-directory)
@@ -80,6 +80,10 @@ across upgrades. In a nutshell:
8080
- The diff between current and previous `/etc` is applied to the new `/etc`
8181
- Locally modified files in `/etc` different from the default `/usr/etc` (of the same deployment) will be retained
8282

83+
You can view the state via `ostree admin config-diff`. Note that the "diff"
84+
here is includes metadata (uid, gid, extended attributes), so changing any of those
85+
will also mean that updated files from the image are not applied.
86+
8387
The implementation of this defaults to being executed by `ostree-finalize-staged.service`
8488
at shutdown time, before the new bootloader entry is created.
8589

@@ -96,6 +100,10 @@ would require external intervention to apply.
96100

97101
For more on configuration file best practices, see [Building](building/guidance.md).
98102

103+
To emphasize again, it's recommended to enable `etc.transient` if possible, though
104+
when using that you may need to store some machine-specific state in e.g. the
105+
kernel commandline if applicable.
106+
99107
### `/usr/etc`
100108

101109
The `/usr/etc` tree is generated client side and contains the default container image's

0 commit comments

Comments
 (0)