-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
slices/systemd: rely on initialization services upon first boot of sy…
…stemd
- Loading branch information
1 parent
92fe571
commit 4228943
Showing
1 changed file
with
9 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ slices: | |
- mount_bins | ||
- systemd_libs | ||
- systemd_config | ||
- systemd_generated-config | ||
contents: | ||
/usr/bin/busctl: | ||
/usr/bin/hostnamectl: | ||
|
@@ -534,73 +535,20 @@ slices: | |
/etc/systemd/user.conf: | ||
/etc/xdg/systemd/user: | ||
|
||
# generated config slice is to emulate symlinks or initial state | ||
# config generated by systemd upon install | ||
# Generated config slice is to emulate symlinks or initial state | ||
# config generated by systemd upon install. | ||
# Systemd performs a lot of initialization upon install, however since systemd | ||
# does actually not rely on these install actions (since all of these are run as | ||
# a part of the first install / early setup upon first boot), a lot of this is | ||
# left out. It's done like that because systemd needs to be usable after install | ||
# on a running system, but this is not the case here. | ||
# These are the few that seems to be not emulated | ||
generated-config: | ||
contents: | ||
/etc/systemd/system/getty.target.wants/[email protected]: {symlink: /usr/lib/systemd/system/[email protected]} | ||
/etc/systemd/system/multi-user.target.wants/remote-fs.target: {symlink: /usr/lib/systemd/system/remote-fs.target} | ||
/etc/systemd/system/sysinit.target.wants/systemd-pstore.service: {symlink: /usr/lib/systemd/system/systemd-pstore.service} | ||
/etc/systemd/system/sysinit.target.wants/systemd-pcrlock-machine-id.service: {symlink: /usr/lib/systemd/system/systemd-pcrlock-machine-id.service} | ||
/etc/systemd/system/timers.target.wants/systemd-sysupdate-reboot.timer: {symlink: /usr/lib/systemd/system/systemd-sysupdate-reboot.timer} | ||
/etc/systemd/system/sysinit.target.wants/systemd-confext.service: {symlink: /usr/lib/systemd/system/systemd-confext.service} | ||
/etc/systemd/system/sysinit.target.wants/systemd-sysext.service: {symlink: /usr/lib/systemd/system/systemd-sysext.service} | ||
/etc/systemd/system/multi-user.target.wants/remote-veritysetup.target: {symlink: /usr/lib/systemd/system/remote-veritysetup.target} | ||
/etc/systemd/system/dbus-org.freedesktop.network1.service: {symlink: /usr/lib/systemd/system/systemd-networkd.service} | ||
/etc/systemd/system/multi-user.target.wants/systemd-networkd.service: {symlink: /usr/lib/systemd/system/systemd-networkd.service} | ||
/etc/systemd/system/sockets.target.wants/systemd-networkd.socket: {symlink: /usr/lib/systemd/system/systemd-networkd.socket} | ||
/etc/systemd/system/sysinit.target.wants/systemd-network-generator.service: {symlink: /usr/lib/systemd/system/systemd-network-generator.service} | ||
/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service: {symlink: /usr/lib/systemd/system/systemd-networkd-wait-online.service} | ||
/etc/systemd/system/sockets.target.wants/systemd-journald-audit.socket: {symlink: /usr/lib/systemd/system/systemd-journald-audit.socket} | ||
/etc/systemd/system/systemd-journald.service.wants/systemd-journald-audit.socket: {symlink: /usr/lib/systemd/system/systemd-journald-audit.socket} | ||
/etc/systemd/system/sysinit.target.wants/systemd-pcrlock-firmware-code.service: {symlink: /usr/lib/systemd/system/systemd-pcrlock-firmware-code.service} | ||
/etc/systemd/system/sysinit.target.wants/systemd-pcrlock-firmware-config.service: {symlink: /usr/lib/systemd/system/systemd-pcrlock-firmware-config.service} | ||
/etc/systemd/system/sockets.target.wants/systemd-pcrextend.socket: {symlink: /usr/lib/systemd/system/systemd-pcrextend.socket} | ||
/etc/systemd/system/multi-user.target.wants/remote-cryptsetup.target: {symlink: /usr/lib/systemd/system/remote-cryptsetup.target} | ||
/etc/systemd/system/timers.target.wants/systemd-sysupdate.timer: {symlink: /usr/lib/systemd/system/systemd-sysupdate.timer} | ||
/etc/systemd/system/ctrl-alt-del.target: {symlink: /usr/lib/systemd/system/reboot.target} | ||
/etc/systemd/system/sockets.target.wants/systemd-sysext.socket: {symlink: /usr/lib/systemd/system/systemd-sysext.socket} | ||
/etc/systemd/system/sysinit.target.wants/systemd-pcrlock-secureboot-policy.service: {symlink: /usr/lib/systemd/system/systemd-pcrlock-secureboot-policy.service} | ||
/etc/systemd/system/sysinit.target.wants/systemd-pcrlock-make-policy.service: {symlink: /usr/lib/systemd/system/systemd-pcrlock-make-policy.service} | ||
/etc/systemd/system/sysinit.target.wants/systemd-pcrlock-file-system.service: {symlink: /usr/lib/systemd/system/systemd-pcrlock-file-system.service} | ||
/etc/systemd/system/sysinit.target.wants/systemd-pcrlock-secureboot-authority.service: {symlink: /usr/lib/systemd/system/systemd-pcrlock-secureboot-authority.service} | ||
/var/log/journal/: {make: true} | ||
/var/lib/systemd/catalog/database: {mutable: true} | ||
mutate: | | ||
catalog_files = content.list("/usr/lib/systemd/catalog/") | ||
catalog_map = {} | ||
for cf in catalog_files: | ||
# determine language from the file name | ||
nt = cf.split(".") | ||
lang = "" | ||
if len(nt) > 2: | ||
lang = nt[1] | ||
# now read the contents and start to parse for language | ||
catalog = content.read(cf) | ||
lines = catalog.splitlines() | ||
payload = "" | ||
found_id = False | ||
for li in lines: | ||
if li.startswith("#"): | ||
continue | ||
if li.startswith("-- ") and len(li) >= 35: | ||
nli = cf.split() | ||
id = nli[1] | ||
if found_id: | ||
catalog_map[id+lang] = payload | ||
payload = "" | ||
if len(nli) == 3 and lang == "": | ||
lang = nli[2] | ||
found_id = True | ||
continue | ||
if not found_id: | ||
continue | ||
payload += li + "\n" | ||
|
||
dbus-config: | ||
contents: | ||
|