]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(systemd): check for systemd-vconsole-setup.service
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Thu, 4 Jul 2024 01:56:16 +0000 (21:56 -0400)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Mon, 8 Jul 2024 22:47:58 +0000 (18:47 -0400)
modules.d/00systemd/module-setup.sh

index d173c99ffb255a6a914ddc0209a4c0ea1117be8d..ce7bb520c5697fb526a84be26c67b1e8db69248d 100755 (executable)
@@ -158,7 +158,9 @@ EOF
         emergency.target \
         rescue.target; do
         [[ -f "$systemdsystemunitdir"/$i ]] || continue
-        $SYSTEMCTL -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service
+        if [ -e "$systemdsystemunitdir"/systemd-vconsole-setup.service ]; then
+            $SYSTEMCTL -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service
+        fi
     done
 
     mkdir -p "$initdir/etc/systemd"