]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
revert(systemd): trigger systemd-vconsole-setup.service only on demand
authorJo Zzsi <jozzsicsataban@gmail.com>
Thu, 29 Aug 2024 01:53:33 +0000 (21:53 -0400)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Fri, 30 Aug 2024 11:30:15 +0000 (07:30 -0400)
Revert 6b095274fb935ffb7639d1ea7e51f9bd0f487726.

Enable systemd-vconsole-setup.service always when it is avaiable
as it usually gets triggered by udev rules anyways.

modules.d/00systemd/module-setup.sh
modules.d/01systemd-ask-password/module-setup.sh

index 033961b875e5b3054c3eacc16abb5a360078e512..05b8646fb9e568bd836baf7f8d7ab1bbec116340 100755 (executable)
@@ -154,14 +154,8 @@ EOF
     if dracut_module_included "10i18n" && [[ -e "$systemdsystemunitdir"/systemd-vconsole-setup.service ]]; then
         inst_multiple -o \
             "$systemdutildir"/systemd-vconsole-setup \
-            "$systemdsystemunitdir"/systemd-vconsole-setup.service
-
-        for i in \
-            emergency.target \
-            rescue.target; do
-            [[ -f "$systemdsystemunitdir"/$i ]] || continue
-            $SYSTEMCTL -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service
-        done
+            "$systemdsystemunitdir"/systemd-vconsole-setup.service \
+            "$systemdsystemunitdir"/sysinit.target.wants/systemd-vconsole-setup.service
     fi
 
     mkdir -p "$initdir/etc/systemd"
index 866eb3a1ba17cd8dedde9317de93c1d333721f94..40774ab9bb3ad856ebca030b8ad324eba427d73d 100755 (executable)
@@ -48,10 +48,6 @@ install() {
         systemd-ask-password \
         systemd-tty-ask-password-agent
 
-    if [ -e "$systemdsystemunitdir"/systemd-vconsole-setup.service ]; then
-        $SYSTEMCTL -q --root "$initdir" add-wants systemd-ask-password-console.service systemd-vconsole-setup.service
-    fi
-
     # Enable the systemd type service unit for systemd-ask-password.
     $SYSTEMCTL -q --root "$initdir" enable systemd-ask-password-console.service
 
@@ -61,10 +57,6 @@ install() {
             "$systemdsystemunitdir"/systemd-ask-password-plymouth.path \
             "$systemdsystemunitdir"/systemd-ask-password-plymouth.service
 
-        if [ -e "$systemdsystemunitdir"/systemd-vconsole-setup.service ]; then
-            $SYSTEMCTL -q --root "$initdir" add-wants systemd-ask-password-plymouth.service systemd-vconsole-setup.service
-        fi
-
         $SYSTEMCTL -q --root "$initdir" enable systemd-ask-password-plymouth.service
     fi