Files
systemd/units/systemd-imds-import.service.in
Lennart Poettering 13340c6af2 Revert "units: drop After=network-online.target from imds services"
IMDS access requires networking, hence we need to run after
network-online.target. Everything else would be racy and result in
likely timeouts, because we might try to contact the network too early.

This reverts commit 3f33f4d057.
2026-06-19 20:05:14 +02:00

30 lines
1.0 KiB
Plaintext

# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Import System Credentials from IMDS
Documentation=man:systemd-imds(1)
Documentation=man:systemd.system-credentials(7)
DefaultDependencies=no
Wants=systemd-imdsd.socket network-online.target
After=systemd-imdsd.socket network-online.target
Before=sysinit.target systemd-firstboot.service
Conflicts=shutdown.target
Before=shutdown.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart={{LIBEXECDIR}}/systemd-imds --import
# The tool returns EXIT_NOTCONFIGURED if the configuration required for basic
# operation is not found. Do not treat this as error, because the service can
# be started on generic systems that do not have complete IMDS support.
SuccessExitStatus=NOTCONFIGURED