sys-apps/ignition: remove dependency on OEM part.

Not all images have a seperate OEM partition. This was causing boot
failures while the service waited on the device to appear. Instead,
a generator in the initramfs will populate an arg file with the OEM_ID
and the Ignition stages will source that into the environment.
This commit is contained in:
Alex Crawford 2015-10-20 11:05:39 -07:00
parent 3a423414d0
commit 9122aea73b
5 changed files with 2 additions and 18 deletions

View File

@ -5,9 +5,6 @@ DefaultDependencies=false
Requires=local-fs-pre.target Requires=local-fs-pre.target
Before=local-fs-pre.target Before=local-fs-pre.target
Requires=mnt-oem.mount
After=mnt-oem.mount
# setup networking # setup networking
Wants=initrd-systemd-networkd.service Wants=initrd-systemd-networkd.service
After=initrd-systemd-networkd.service After=initrd-systemd-networkd.service
@ -21,6 +18,5 @@ After=disk-uuid.service
[Service] [Service]
Type=oneshot Type=oneshot
Environment=OEM_ID=pxe EnvironmentFile=/run/ignition.env
EnvironmentFile=-/mnt/oem/oem-release
ExecStart=/usr/bin/ignition --root=/sysroot --oem=${OEM_ID} --stage=disks ExecStart=/usr/bin/ignition --root=/sysroot --oem=${OEM_ID} --stage=disks

View File

@ -6,9 +6,6 @@ Before=initrd-parse-etc.service
Requires=initrd-root-fs.target Requires=initrd-root-fs.target
After=initrd-root-fs.target After=initrd-root-fs.target
Requires=mnt-oem.mount
After=mnt-oem.mount
Requires=ignition-disks.service Requires=ignition-disks.service
After=ignition-disks.service After=ignition-disks.service
@ -26,6 +23,5 @@ After=initrd-systemd-resolved.service
[Service] [Service]
Type=oneshot Type=oneshot
Environment=OEM_ID=pxe EnvironmentFile=/run/ignition.env
EnvironmentFile=-/mnt/oem/oem-release
ExecStart=/usr/bin/ignition --root=/sysroot --oem=${OEM_ID} --stage=files ExecStart=/usr/bin/ignition --root=/sysroot --oem=${OEM_ID} --stage=files

View File

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

View File

@ -31,7 +31,6 @@ src_compile() {
src_install() { src_install() {
newbin ${GOBIN}/src ${PN} newbin ${GOBIN}/src ${PN}
systemd_dounit "${FILESDIR}"/mnt-oem.mount
systemd_dounit "${FILESDIR}"/ignition.target systemd_dounit "${FILESDIR}"/ignition.target
systemd_dounit "${FILESDIR}"/ignition-disks.service systemd_dounit "${FILESDIR}"/ignition-disks.service
systemd_dounit "${FILESDIR}"/ignition-files.service systemd_dounit "${FILESDIR}"/ignition-files.service