#!/usr/bin/env bash # SPDX-License-Identifier: LGPL-2.1-or-later # shellcheck disable=SC2317 set -ex set -o pipefail # shellcheck source=test/units/util.sh . "$(dirname "$0")"/util.sh # This is a test case for #16735. IFNAME=test-netif-foo at_exit() { set +e rm -f /tmp/output-i /tmp/output-I rm -rf /run/udev/rules.d/ udevadm control --reload rm -f /run/systemd/system/test@.service systemctl daemon-reload ip link del "$IFNAME" } trap at_exit EXIT udevadm settle --timeout 30 mkdir -p /run/systemd/system/ cat >/run/systemd/system/test@.service </tmp/output-i; echo "I=/%I" >/tmp/output-I' RemainAfterExit=yes EOF systemctl daemon-reload mkdir -p /run/udev/rules.d/ cat >/run/udev/rules.d/99-testsuite.rules <