ignition/ignition-suse-generator
Ignaz Forster a71d5e1ac3 - ignition-mount-initrd-fstab.service:
- 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
2022-04-06 17:10:21 +00:00

25 lines
793 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-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