ignition/ignition-suse-generator
Ignaz Forster 35d7b6c402 - is-live-image doesn't exist on *SUSE, and our live images don't
use Ignition, so just add the Ignition device dependency to the
  service file directly.

OBS-URL: https://build.opensuse.org/package/show/devel:kubic:ignition/ignition?expand=0&rev=80
2021-08-12 17:47:02 +00:00

24 lines
720 B
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
# Call upstream generator
. /usr/lib/systemd/system-generators/ignition-generator
. /run/ignition.env
add_requires ignition-mount-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