sys-apps/ignition: update to match new stages

This now includes ignition-disks.service and ignition-files.service
which run their respective stages. Both of these services are required
by ignition.target which is wanted when the udev rule matches an
unbooted disk.
This commit is contained in:
Alex Crawford 2015-07-14 16:26:19 -07:00
parent 4f00bca819
commit 0f278e5633
8 changed files with 66 additions and 21 deletions

View File

@ -0,0 +1 @@
SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_PART_TABLE_UUID}=="00000000-0000-0000-0000-000000000001", TAG+="systemd", ENV{SYSTEMD_WANTS}+="ignition.target"

View File

@ -1,2 +0,0 @@
[Unit]
Description=Runtime Metadata

View File

@ -0,0 +1,19 @@
[Unit]
Description=Ignition
DefaultDependencies=false
Conflicts=initrd-switch-root.target
Before=initrd-switch-root.target
Requires=local-fs-pre.target
Before=local-fs-pre.target
Requires=mnt-oem.mount
After=mnt-oem.mount
[Service]
Type=oneshot
TimeoutStartSec=30s
Environment=OEM_NAME=pxe
Environment=FETCH_TIMEOUT=1m
EnvironmentFile=-/mnt/oem/environment
ExecStart=/usr/bin/ignition --root=/sysroot --oem=${OEM_NAME} --stage=disks --fetchtimeout=${FETCH_TIMEOUT}

View File

@ -0,0 +1,19 @@
[Unit]
Description=Ignition
DefaultDependencies=false
Conflicts=initrd-switch-root.target
Before=initrd-switch-root.target
Requires=initrd-root-fs.target
After=initrd-root-fs.target
Requires=mnt-oem.mount
After=mnt-oem.mount
[Service]
Type=oneshot
TimeoutStartSec=30s
Environment=OEM_NAME=pxe
Environment=FETCH_TIMEOUT=1m
EnvironmentFile=-/mnt/oem/environment
ExecStart=/usr/bin/ignition --root=/sysroot --oem=${OEM_NAME} --stage=files --fetchtimeout=${FETCH_TIMEOUT}

View File

@ -1,16 +0,0 @@
[Unit]
Description=Ignition
Requires=initrd-fs.target
After=initrd-fs.target
ConditionPathExists=/etc/initrd-release
ConditionPathExists=!/sysroot/etc/machine-id
[Service]
Type=oneshot
RemainAfterExit=yes
Environment=OEM_NAME=pxe
EnvironmentFile=-/usr/share/oem/environment
ExecStart=/usr/bin/ignition --root=/sysroot --oem=${OEM_NAME}
[Install]
WantedBy=initrd.target

View File

@ -0,0 +1,13 @@
[Unit]
DefaultDependencies=false
Conflicts=initrd-switch-root.target
Before=initrd-switch-root.target
OnFailure=emergency.target
OnFailureJobMode=replace-irreversibly
Requires=ignition-disks.service
After=ignition-disks.service
Requires=ignition-files.service
After=ignition-files.service

View File

@ -0,0 +1,8 @@
[Unit]
DefaultDependencies=false
Conflicts=initrd-switch-root.target
Before=initrd-switch-root.target
[Mount]
What=/dev/disk/by-label/OEM
Where=/mnt/oem

View File

@ -26,9 +26,12 @@ src_compile() {
src_install() { src_install() {
newbin ${GOBIN}/src ${PN} newbin ${GOBIN}/src ${PN}
systemd_dounit "${FILESDIR}"/coreos-metadata.target udev_dorules "${FILESDIR}"/90-ignition.rules
systemd_dounit "${FILESDIR}"/ignition.service
systemd_enable_service initrd.target ignition.service systemd_dounit "${FILESDIR}"/mnt-oem.mount
systemd_dounit "${FILESDIR}"/ignition.target
systemd_dounit "${FILESDIR}"/ignition-disks.service
systemd_dounit "${FILESDIR}"/ignition-files.service
coreos-dodoc -r doc/* coreos-dodoc -r doc/*
} }