2020-08-10 11:28:19 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
|
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
|
|
|
|
|
|
depends() {
|
|
|
|
echo ignition
|
|
|
|
}
|
|
|
|
|
2021-08-09 17:33:18 +02:00
|
|
|
install_ignition_unit() {
|
|
|
|
local unit="$1"; shift
|
|
|
|
local target="${1:-ignition-complete.target}"; shift
|
|
|
|
local instantiated="${1:-$unit}"; shift
|
|
|
|
inst_simple "$moddir/$unit" "$systemdsystemunitdir/$unit"
|
|
|
|
# note we `|| exit 1` here so we error out if e.g. the units are missing
|
|
|
|
# see https://github.com/coreos/fedora-coreos-config/issues/799
|
|
|
|
systemctl -q --root="$initdir" add-requires "$target" "$instantiated" || exit 1
|
|
|
|
}
|
|
|
|
|
2020-08-10 11:28:19 +02:00
|
|
|
install() {
|
|
|
|
inst_simple "$moddir/ignition-enable-network.service" \
|
|
|
|
"$systemdsystemunitdir/ignition-enable-network.service"
|
|
|
|
inst_simple "$moddir/ignition-mount-initrd-fstab.service" \
|
|
|
|
"$systemdsystemunitdir/ignition-mount-initrd-fstab.service"
|
2022-04-06 19:10:21 +02:00
|
|
|
inst_simple "$moddir/ignition-umount-initrd-fstab.service" \
|
|
|
|
"$systemdsystemunitdir/ignition-umount-initrd-fstab.service"
|
2020-08-10 11:28:19 +02:00
|
|
|
inst_simple "$moddir/ignition-userconfig-timeout.conf" \
|
|
|
|
"$systemdsystemunitdir/dev-disk-by\x2dlabel-ignition.device.d/ignition-userconfig-timeout.conf"
|
2022-03-25 16:23:52 +01:00
|
|
|
inst_simple "$moddir/ignition-touch-selinux-autorelabel.conf" \
|
|
|
|
"$systemdsystemunitdir/ignition-files.service.d/ignition-touch-selinux-autorelabel.conf"
|
2020-08-10 11:28:19 +02:00
|
|
|
inst_simple "$moddir/ignition-suse-generator" \
|
|
|
|
"/etc/systemd/system-generators/ignition-generator"
|
|
|
|
inst_script "$moddir/ignition-enable-network.sh" \
|
|
|
|
"/usr/sbin/ignition-enable-network"
|
2021-08-09 17:33:18 +02:00
|
|
|
inst_script "$moddir/ignition-setup-user.sh" \
|
|
|
|
"/usr/sbin/ignition-setup-user"
|
2020-09-04 09:44:25 +02:00
|
|
|
inst_multiple awk systemd-detect-virt
|
2022-03-16 17:27:02 +01:00
|
|
|
install_ignition_unit ignition-remove-reconfig_system.service initrd.target
|
2021-08-09 17:33:18 +02:00
|
|
|
install_ignition_unit ignition-setup-user.service
|
2020-08-10 11:28:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
installkernel() {
|
2021-07-28 16:00:07 +02:00
|
|
|
# Make sure we can read configuration from ISO image and vfat formated USB drives
|
|
|
|
hostonly='' instmods iso9660 vfat =fs/nls
|
2020-08-10 11:28:19 +02:00
|
|
|
}
|