Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
WIP: Add new ignition-fetch-offline.service
Browse files Browse the repository at this point in the history
  • Loading branch information
jlebon committed Mar 30, 2020
1 parent ea3bdc9 commit 11025db
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
18 changes: 18 additions & 0 deletions dracut/30ignition/ignition-fetch-offline.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[Unit]
Description=Ignition (fetch-offline)
Documentation=https://github.com/coreos/ignition
ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target
After=basic.target

# Run after ignition-setup has run because ignition-setup
# may copy in new/different ignition configs for us to consume.
After=ignition-setup-base.service
After=ignition-setup-user.service

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/run/ignition.env
ExecStart=/usr/bin/ignition --root=/sysroot --platform=${PLATFORM_ID} --stage=fetch-offline
14 changes: 7 additions & 7 deletions dracut/30ignition/ignition-fetch.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target
After=basic.target
ConditionPathExists=/run/ignition/neednet

# Run after ignition-setup has run because ignition-setup
# may copy in new/different ignition configs for us to consume.
After=ignition-setup-base.service
After=ignition-setup-user.service

# Network may be used to fetch userdata content.
After=network.target
Requires=ignition-fetch-offline.service
After=ignition-fetch-offline.service

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/run/ignition.env
# The reason for this awkward bit here is that having
# Wants=network-online.target in ignition-fetch.service will cause systemd
# to always start networking even if ConditionPathExists fails.
ExecStart=/usr/bin/systemctl start network-online.target
ExecStart=/usr/bin/ignition --root=/sysroot --platform=${PLATFORM_ID} --stage=fetch
1 change: 1 addition & 0 deletions dracut/30ignition/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ install() {
install_ignition_unit ignition-setup-base.service
install_ignition_unit ignition-setup-user.service
install_ignition_unit ignition-fetch.service
install_ignition_unit ignition-fetch-offline.service
install_ignition_unit ignition-disks.service
install_ignition_unit ignition-mount.service
install_ignition_unit ignition-files.service
Expand Down

0 comments on commit 11025db

Please sign in to comment.