]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test(FULL-SYSTEMD): skip systemd-network-management if missing
authorBenjamin Drung <benjamin.drung@canonical.com>
Fri, 7 Feb 2025 18:35:35 +0000 (19:35 +0100)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Wed, 12 Feb 2025 10:23:13 +0000 (11:23 +0100)
The Debian/Ubuntu package runs the FULL-SYSTEMD test without
dracut-network installed. Therefore the test fails due to the missing
`systemd-network-management` module:

```
TEST: Full systemd serialization/deserialization test with /usr mount
dracut[E]: Module 'systemd-network-management' cannot be found.
```

Fixes: 75f3a191b675 ("test(FULL-SYSTEMD): when systemd-networkd is available, install it")
test/TEST-41-FULL-SYSTEMD/test.sh

index 23180d4fba779b9dfba7a3cb928d3319d90238e9..9f68b06c2c8db658f4e6ee55d6014cd9da342df4 100755 (executable)
@@ -79,7 +79,7 @@ test_setup() {
         dracut_modules="$dracut_modules dbus-daemon"
     fi
 
-    if [ -f /usr/lib/systemd/systemd-networkd ]; then
+    if [ -f /usr/lib/systemd/systemd-networkd ] && [ -e "${PKGLIBDIR}/modules.d/00systemd-network-management/module-setup.sh" ]; then
         dracut_modules="$dracut_modules systemd-network-management"
     fi