From 865e9c9a7fb7172f546a4359e2d6619328f2076b Mon Sep 17 00:00:00 2001 From: Tuan Hoang Date: Thu, 10 Oct 2019 18:29:59 +0200 Subject: [PATCH] firstboot-complete: tell zipl to run zipl records need to be updated, because ignition.firstboot is burned into target disk during coreos-installer As a short-term solution for: https://github.com/coreos/ignition-dracut/issues/84 Depends on: https://github.com/ibm-s390-tools/s390-tools/pull/71 https://github.com/ibm-s390-tools/s390-tools/pull/74 Related: https://github.com/coreos/coreos-installer/pull/61 https://github.com/coreos/coreos-assembler/pull/780 (cherry picked from commit 38af701ac39d9a2f11f9d377f5a5b0168f7a0cb3) --- systemd/ignition-firstboot-complete.service | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/systemd/ignition-firstboot-complete.service b/systemd/ignition-firstboot-complete.service index 19d6976..2b9f98b 100644 --- a/systemd/ignition-firstboot-complete.service +++ b/systemd/ignition-firstboot-complete.service @@ -17,7 +17,13 @@ RemainAfterExit=yes # detected this file. Fail if we are unable to remove it, rather than risking # rerunning Ignition at next boot. MountFlags=slave -ExecStart=/bin/sh -c 'mount -o remount,rw /boot && rm /boot/ignition.firstboot' +# 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