ignition/drop-ignition-firstboot-complete-2.11.0.patch

68 lines
2.6 KiB
Diff
Raw Normal View History

From fdbd1e41bb15d24936e4c14323ea988a0ecf0846 Mon Sep 17 00:00:00 2001
From: Jonathan Lebon <jonathan@jlebon.com>
Date: Tue, 6 Jul 2021 14:49:32 -0400
Subject: [PATCH 1/3] Remove ignition-firstboot-complete.service
This is a distro-level integration service. Let's remove it from here
and have it live e.g. in coreos/fedora-coreos-config for FCOS/RHCOS.
Closes: #1125
---
Makefile | 1 -
systemd/ignition-firstboot-complete.service | 31 ---------------------
2 files changed, 32 deletions(-)
delete mode 100644 systemd/ignition-firstboot-complete.service
diff --git a/Makefile b/Makefile
index 6b3f49a4..af9a94ad 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,6 @@ install: all
install -m 0644 -D -t $(DESTDIR)/usr/lib/dracut/modules.d/$${bn} $$x/*; \
done
chmod a+x $(DESTDIR)/usr/lib/dracut/modules.d/*/*.sh $(DESTDIR)/usr/lib/dracut/modules.d/*/*-generator
- install -m 0644 -D -t $(DESTDIR)/usr/lib/systemd/system systemd/*
install -m 0755 -D -t $(DESTDIR)/usr/lib/dracut/modules.d/30ignition bin/$(GOARCH)/ignition
install -m 0755 -D -t $(DESTDIR)/usr/bin bin/$(GOARCH)/ignition-validate
diff --git a/systemd/ignition-firstboot-complete.service b/systemd/ignition-firstboot-complete.service
deleted file mode 100644
index c506773a..00000000
--- a/systemd/ignition-firstboot-complete.service
+++ /dev/null
@@ -1,31 +0,0 @@
-[Unit]
-Description=Mark boot complete
-Documentation=https://github.com/coreos/ignition
-ConditionKernelCommandLine=ignition.firstboot
-ConditionPathExists=!/run/ostree-live
-RequiresMountsFor=/boot
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-# The MountFlags=slave is so we remount /boot temporarily writable;
-# see https://github.com/ostreedev/ostree/issues/1265 for the bigger picture.
-# This option creates a new mount namespace; from the point of view of
-# everything else, /boot stays readonly. We only have a transient writable mount
-# for the lifetime of the unit.
-#
-# Also regarding the lack of `-f` for rm ; we should have only run if GRUB
-# detected this file. Fail if we are unable to remove it, rather than risking
-# rerunning Ignition at next boot.
-MountFlags=slave
-# It is better to have a separate script to do this but it might be polluting
-# the target system with some script in i.e. /usr/sbin/firstboot-complete
-# The retval code is still respected with having this if-else block.
-ExecStart=/bin/sh -c \
- 'mount -o remount,rw /boot && \
- if [[ $(uname -m) = s390x ]]; then zipl; fi && \
- rm /boot/ignition.firstboot'
-
-[Install]
-# Part of basic.target so this happens early on in firstboot
-WantedBy=basic.target
--
2.31.1