diff options
Diffstat (limited to 'meta-phosphor/recipes-phosphor/flash/noverify-bmc-update')
3 files changed, 11 insertions, 2 deletions
diff --git a/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/config-bmc.json b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/config-bmc.json index 86afb3ba3..31df4a1ef 100644 --- a/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/config-bmc.json +++ b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/config-bmc.json @@ -14,7 +14,7 @@ }, "update": { "type": "systemd", - "unit": "reboot.target" + "unit": "noverify-bmc-update.service" } } }] diff --git a/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-update.service b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-update.service new file mode 100644 index 000000000..e30d64723 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-update.service @@ -0,0 +1,9 @@ +[Unit] +Description=Commit image for update and reboot + +[Service] +Type=oneshot +ExecStart=/bin/mv /run/initramfs/bmc-image-verified /run/initramfs/image-bmc +# This command is intentionally blocking to ensure this unit doesn't complete +# before the BMC reboots. +ExecStart=/usr/bin/systemctl start --job-mode=replace-irreversibly reboot.target diff --git a/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-verify.service b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-verify.service index 50855b6b2..a535329fb 100644 --- a/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-verify.service +++ b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-verify.service @@ -3,4 +3,4 @@ Description=Don't verify the image, just stage it for update [Service] Type=oneshot -ExecStart=/bin/mv /run/initramfs/bmc-image /run/initramfs/image-bmc +ExecStart=/bin/mv /run/initramfs/bmc-image /run/initramfs/bmc-image-verified |