combustion/module-setup.sh
Fabian Vogt 3a12418b0e Accepting request 839820 from home:favogt:combustion
- Implement support for systems without transactional-update
- Require rmdir explicitly

- Fail properly when the retval file doesn't exist
- Stop ignition-mount.service to avoid conflict (boo#1176746)

OBS-URL: https://build.opensuse.org/request/show/839820
OBS-URL: https://build.opensuse.org/package/show/devel:kubic:ignition/combustion?expand=0&rev=9
2020-10-06 13:08:49 +00:00

20 lines
936 B
Bash

depends() {
echo bash network systemd url-lib
}
install() {
inst_simple "${moddir}/combustion.service" "${systemdsystemunitdir}/combustion.service"
inst_simple "${moddir}/combustion-prepare.service" "${systemdsystemunitdir}/combustion-prepare.service"
inst_simple "${moddir}/combustion.rules" "/etc/udev/rules.d/70-combustion.rules"
mkdir -p "${initdir}/${systemdsystemunitdir}/initrd.target.requires/"
ln_r "../combustion.service" "${systemdsystemunitdir}/initrd.target.requires/combustion.service"
inst_multiple awk chroot findmnt rmdir
inst_simple "${moddir}/combustion" "/usr/bin/combustion"
# Wait up to 10s (30s on aarch64) for the config drive
devtimeout=10
[ "$(uname -m)" = "aarch64" ] && devtimeout=30
mkdir -p "${initdir}/${systemdsystemunitdir}/dev-combustion-config.device.d/"
echo -e "[Unit]\nJobTimeoutSec=${devtimeout}" > "${initdir}/${systemdsystemunitdir}/dev-combustion-config.device.d/timeout.conf"
}