ignition/ignition-suse-generator
Ignaz Forster 69f59feb61 - Update to version 2.20.0:
* Features
    * Support partitioning disk with mounted partitions
    * Support Proxmox VE
    * Support gzipped Akamai user_data
  * Changes
    * The Dracut module now installs partx
    * Mark the 3.5.0 config spec as stable
    * No longer accept configs with version 3.5.0-experimental
    * Create new 3.6.0-experimental config spec from 3.5.0
  * Bug fixes
    * Fix network race when phoning home on Equinix Metal
    * Fix Akamai Ignition base64 decoding on padded payloads
    * Fix Makefile GOARCH for loongarch64 (#1942)
- Drop go build bugfix again, fixed upstream
- Adapting 0002-allow-multiple-mounts-of-same-device.patch to new
  3.6.0 spec

OBS-URL: https://build.opensuse.org/package/show/devel:kubic:ignition/ignition?expand=0&rev=131
2024-11-07 20:16:44 +00:00

54 lines
1.5 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
set -e
# Generators don't have logging right now
# https://github.com/systemd/systemd/issues/15638
exec 1>/dev/kmsg; exec 2>&1
UNIT_DIR="${1:-/tmp}"
cmdline=( $(</proc/cmdline) )
cmdline_arg() {
local name="$1" value="$2"
for arg in "${cmdline[@]}"; do
if [[ "${arg%%=*}" == "${name}" ]]; then
value="${arg#*=}"
fi
done
echo "${value}"
}
add_requires() {
local name="$1"; shift
local target="$1"; shift
local requires_dir="${UNIT_DIR}/${target}.requires"
mkdir -p "${requires_dir}"
ln -sf "../${name}" "${requires_dir}/${name}"
}
add_requires ignition-complete.target firstboot.target
add_requires ignition-diskful.target ignition-complete.target
# TODO: Add support for ignition-subsequent.target, when needed?
echo "PLATFORM_ID=$(cmdline_arg ignition.platform.id)" > /run/ignition.env
. /run/ignition.env
add_requires ignition-mount-initrd-fstab.service ignition-files.service
add_requires ignition-umount-initrd-fstab.service ignition-files.service
add_requires ignition-enable-network.service ignition-fetch.service
if [ -z "${PLATFORM_ID}" ]; then
platform="$(systemd-detect-virt || true)"
case "${platform}" in
*vmware*) platform="vmware" ;;
*oracle*) platform="virtualbox" ;;
*kvm*|*qemu*) platform="qemu" ;;
*) platform="metal" ;;
esac
echo "PLATFORM_ID=${platform}" > /run/ignition.env
fi