Reboot once post ignition in Fedora CoreOS?

hey @minWi - a previous version of our OS Extensions documentation did just this.

variant: fcos
version: 1.4.0
systemd:
  units:
    # installing nano as a layered package with rpm-ostree
    - name: rpm-ostree-install-nano.service
      enabled: true
      contents: |
        [Unit]
        Description=Layer nano with rpm-ostree
        # We run after `systemd-machine-id-commit.service` to ensure that
        # `ConditionFirstBoot=true` services won't rerun on the next boot.
        After=systemd-machine-id-commit.service
        Wants=network-online.target
        After=network-online.target
        # We run before `zincati.service` to avoid conflicting rpm-ostree
        # transactions.
        Before=zincati.service
        ConditionPathExists=!/var/lib/%N.stamp

        [Service]
        Type=oneshot
        RemainAfterExit=yes
        ExecStart=/usr/bin/rpm-ostree install --allow-inactive nano
        ExecStart=/bin/touch /var/lib/%N.stamp
        ExecStart=/bin/systemctl --no-block reboot

        [Install]
        WantedBy=multi-user.target
1 Like