2020-07-22 10:08:29 +02:00
|
|
|
depends() {
|
|
|
|
echo bash network systemd url-lib
|
|
|
|
}
|
|
|
|
|
|
|
|
install() {
|
|
|
|
inst_simple "${moddir}/combustion.service" "${systemdsystemunitdir}/combustion.service"
|
2020-09-11 10:27:57 +02:00
|
|
|
inst_simple "${moddir}/combustion-prepare.service" "${systemdsystemunitdir}/combustion-prepare.service"
|
2020-09-18 09:12:39 +02:00
|
|
|
inst_simple "${moddir}/combustion.rules" "/etc/udev/rules.d/70-combustion.rules"
|
2020-07-22 10:08:29 +02:00
|
|
|
mkdir -p "${initdir}/${systemdsystemunitdir}/initrd.target.requires/"
|
|
|
|
ln_r "../combustion.service" "${systemdsystemunitdir}/initrd.target.requires/combustion.service"
|
2021-01-25 14:18:55 +01:00
|
|
|
inst_multiple awk chroot findmnt grep rmdir
|
2020-07-22 10:08:29 +02:00
|
|
|
inst_simple "${moddir}/combustion" "/usr/bin/combustion"
|
|
|
|
|
2022-03-24 13:31:18 +01:00
|
|
|
# ignition-mount.service mounts stuff below /sysroot in ExecStart and umounts
|
|
|
|
# it on ExecStop, failing if umounting fails. This conflicts with the
|
|
|
|
# mounts/umounts done by combustion. Just let combustion do it instead.
|
|
|
|
mkdir -p "${initdir}/${systemdsystemunitdir}/ignition-mount.service.d/"
|
|
|
|
echo -e "[Service]\nExecStop=" > "${initdir}/${systemdsystemunitdir}/ignition-mount.service.d/noexecstop.conf"
|
|
|
|
|
2020-07-22 10:08:29 +02:00
|
|
|
# Wait up to 10s (30s on aarch64) for the config drive
|
|
|
|
devtimeout=10
|
|
|
|
[ "$(uname -m)" = "aarch64" ] && devtimeout=30
|
2020-09-18 09:12:39 +02:00
|
|
|
mkdir -p "${initdir}/${systemdsystemunitdir}/dev-combustion-config.device.d/"
|
|
|
|
echo -e "[Unit]\nJobTimeoutSec=${devtimeout}" > "${initdir}/${systemdsystemunitdir}/dev-combustion-config.device.d/timeout.conf"
|
2020-07-22 10:08:29 +02:00
|
|
|
}
|