]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
systemd: skip dependency add for non-existent units
authorHarald Hoyer <harald@redhat.com>
Mon, 20 Apr 2020 13:07:02 +0000 (15:07 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Mon, 20 Apr 2020 14:24:15 +0000 (16:24 +0200)
Fixes: https://github.com/dracutdevs/dracut/issues/795
modules.d/00systemd/module-setup.sh

index 5ebdfc301332b16c3ee7e4923bc0d4d80b9cfada..17be74fd96c17eeb88247a49a4ecf5021c3691d1 100755 (executable)
@@ -241,6 +241,7 @@ install() {
         systemd-ask-password-console.service \
         systemd-ask-password-plymouth.service \
         ; do
+        [[ -f $systemdsystemunitdir/$i ]] || continue
         systemctl -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service
     done