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

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jlebon committed Feb 27, 2019
1 parent a29cccd commit 51eef26
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 20 deletions.
22 changes: 3 additions & 19 deletions dracut/30ignition/ignition-files.service
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,13 @@
Description=Ignition (files)
DefaultDependencies=false

# Ignition files stage starts after /sysroot is mounted.
Requires=initrd-root-fs.target
After=initrd-root-fs.target

# Require and run after ignition-setup has run because ignition-setup
# may copy in new/different ignition configs for us to consume.
Requires=ignition-setup.service
After=ignition-setup.service

# Make sure root filesystem is mounted read-write
Requires=ignition-remount-sysroot.service
After=ignition-remount-sysroot.service
# We need all the filesystems already mounted.
Requires=ignition-mount.service
After=ignition-mount.service

# Run before initrd-parse-etc so that we can drop files it then picks up.
Before=initrd-parse-etc.service

# Network may be required to fetch userdata content.
After=network.target

# This is guaranteed through After=initrd-root-fs.target but just to
# be explicit we'll add an After=ignition-disks.service here.
After=ignition-disks.service

[Service]
Type=oneshot
EnvironmentFile=/run/ignition.env
Expand Down
3 changes: 2 additions & 1 deletion dracut/30ignition/ignition-generator
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ add_requires() {
# boot (https://github.com/coreos/fedora-coreos-config/issues/43)
if $(cmdline_bool 'ignition.firstboot' 0); then
add_requires ignition-disks.service
add_requires ignition-mount.service
add_requires ignition-files.service
add_requires ignition-ask-var-mount.service
add_requires ignition-umount.service
fi

# Write ignition-setup.service customized for PXE/ISO or regular boot
Expand Down
16 changes: 16 additions & 0 deletions dracut/30ignition/ignition-mount.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
Description=Ignition (mount)
DefaultDependencies=false

# Make sure /sysroot is mounted first, since we're mounting under there
Requires=initrd-root-fs.target
After=initrd-root-fs.target

# Make sure root filesystem is remounted read-write if needed
Requires=ignition-remount-sysroot.service
After=ignition-remount-sysroot.service

[Service]
Type=oneshot
EnvironmentFile=/run/ignition.env
ExecStart=/usr/bin/ignition --root=/sysroot --platform=${PLATFORM_ID} --stage=mount --log-to-stdout
12 changes: 12 additions & 0 deletions dracut/30ignition/ignition-umount.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=Ignition (umount)
DefaultDependencies=false

# Only unmount after we're done writing to the filesystems
Requires=ignition-files.service
After=ignition-files.service

[Service]
Type=oneshot
EnvironmentFile=/run/ignition.env
ExecStart=/usr/bin/ignition --root=/sysroot --platform=${PLATFORM_ID} --stage=umount --log-to-stdout

0 comments on commit 51eef26

Please sign in to comment.