Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

40ignition-ostree: add service for deleting /etc enablements #363

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[Unit]
Description=Delete /etc Service Enablements
DefaultDependencies=false
ConditionKernelCommandLine=|ostree
ConditionPathExists=|/run/ostree-live

# Really, we don't really expect mount points for /etc, so we could just order
# after initrd-root-fs.target, but meh... doesn't hurt to pretend we support
# that.
After=ignition-mount.service

# But *before* any user-specified enablement
Before=ignition-files.service

[Service]
Type=oneshot
RemainAfterExit=yes
# use glob instead of nuking /etc/systemd/system itself so that we don't end up
# recreating it from the initrd as unlabeled for RHCOS
ExecStart=/usr/bin/sh -c "rm -rf /sysroot/etc/systemd/system/*"
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,6 @@ install() {
inst_script "$moddir/coreos-growpart" /usr/libexec/coreos-growpart

inst_script "$moddir/coreos-relabel" /usr/bin/coreos-relabel

install_ignition_unit ignition-ostree-delete-etc-services.service
}