forked from pool/ignition
a71d5e1ac3
- Don't ignore errors in loops - Unmount mount points recursively - a new submount may have appeared - Split umount part into own service file: - ignition-umount-initrd-fstab.service: - Unmounts the additional mounts as soon as they are not required for Ignition any more; the ExecStop operation is running quite late in initrd and may unmount essential mount points flagged with "x-initrd.mount" (e.g. when storing /usr on a separate mount point). In theory this will also affect Ignition itself, but it hasn't been reported as a problem so far. OBS-URL: https://build.opensuse.org/package/show/devel:kubic:ignition/ignition?expand=0&rev=91
45 lines
1.9 KiB
Bash
45 lines
1.9 KiB
Bash
#!/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
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
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"
|
|
inst_simple "$moddir/ignition-umount-initrd-fstab.service" \
|
|
"$systemdsystemunitdir/ignition-umount-initrd-fstab.service"
|
|
inst_simple "$moddir/ignition-userconfig-timeout.conf" \
|
|
"$systemdsystemunitdir/dev-disk-by\x2dlabel-ignition.device.d/ignition-userconfig-timeout.conf"
|
|
inst_simple "$moddir/ignition-touch-selinux-autorelabel.conf" \
|
|
"$systemdsystemunitdir/ignition-files.service.d/ignition-touch-selinux-autorelabel.conf"
|
|
inst_simple "$moddir/ignition-suse-generator" \
|
|
"/etc/systemd/system-generators/ignition-generator"
|
|
inst_script "$moddir/ignition-enable-network.sh" \
|
|
"/usr/sbin/ignition-enable-network"
|
|
inst_script "$moddir/ignition-setup-user.sh" \
|
|
"/usr/sbin/ignition-setup-user"
|
|
inst_multiple awk systemd-detect-virt
|
|
install_ignition_unit ignition-remove-reconfig_system.service initrd.target
|
|
install_ignition_unit ignition-setup-user.service
|
|
}
|
|
|
|
installkernel() {
|
|
# Make sure we can read configuration from ISO image and vfat formated USB drives
|
|
hostonly='' instmods iso9660 vfat =fs/nls
|
|
}
|