mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-21 22:41:09 +02:00
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:
parent
4f00bca819
commit
0f278e5633
1
sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/files/90-ignition.rules
vendored
Normal file
1
sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/files/90-ignition.rules
vendored
Normal 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"
|
@ -1,2 +0,0 @@
|
||||
[Unit]
|
||||
Description=Runtime Metadata
|
19
sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/files/ignition-disks.service
vendored
Normal file
19
sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/files/ignition-disks.service
vendored
Normal 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}
|
19
sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/files/ignition-files.service
vendored
Normal file
19
sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/files/ignition-files.service
vendored
Normal 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}
|
@ -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
|
13
sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/files/ignition.target
vendored
Normal file
13
sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/files/ignition.target
vendored
Normal 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
|
8
sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/files/mnt-oem.mount
vendored
Normal file
8
sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/files/mnt-oem.mount
vendored
Normal 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
|
@ -26,9 +26,12 @@ src_compile() {
|
||||
src_install() {
|
||||
newbin ${GOBIN}/src ${PN}
|
||||
|
||||
systemd_dounit "${FILESDIR}"/coreos-metadata.target
|
||||
systemd_dounit "${FILESDIR}"/ignition.service
|
||||
systemd_enable_service initrd.target ignition.service
|
||||
udev_dorules "${FILESDIR}"/90-ignition.rules
|
||||
|
||||
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/*
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user