mkosi: Store /etc under /usr/share/factory/mkosi

If we're making a /usr only image, we still want to populate /etc
fully on first boot. To make that possible, let's copy /etc to
/usr/share/factory/mkosi in a finalize script, which runs after
all changes to the image have been made. Let's also add a tmpfiles
snippet that merges /usr/share/factory/mkosi with /etc on boot to
populate /etc.
This commit is contained in:
Daan De Meyer
2023-05-13 09:17:15 +02:00
parent 79255d86ba
commit 724683c27f
2 changed files with 7 additions and 0 deletions
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
C+! /etc - - - - /usr/share/factory/mkosi
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
cp --archive --recursive --no-target-directory --reflink=auto "$BUILDROOT"/etc "$BUILDROOT"/usr/share/factory/mkosi