OSDN Git Service

[fix] : Fixed systemd service error where gdm-plymouth does not exist.
[alterlinux/alterlinux.git] / modules / gdm / airootfs.any / root / customize_airootfs_gdm.sh
index 17da723..6a856af 100755 (executable)
@@ -8,11 +8,11 @@
 #
 
 # Enable gdm to auto login
-if [[ "${boot_splash}" =  true ]]; then
-    systemctl enable gdm-plymouth.service
-else
-    systemctl enable gdm.service
-fi
+#if [[ "${boot_splash}" =  true ]]; then
+#    _safe_systemctl enable gdm-plymouth.service
+#else
+    _safe_systemctl enable gdm.service
+#fi
 
 
 # Replace auto login user
@@ -25,3 +25,11 @@ if [[ ! "${language}" = "ja" ]]; then
     sed -i "s/export QT_IM_MODULE=fcitx/#export QT_IM_MODULE=fcitx/g" "/etc/environment"
     sed -i "s/export XMODIFIERS=@im=fcitx/#export XMODIFIERS=@im=fcitx/g" "/etc/environment"
 fi
+
+# Prepare gdm for calamares
+for file in "services" "services-plymouth"; do
+    if [[ -f "/usr/share/calamares/modules/${file}.conf" ]]; then
+        sed -i "s|%DM%|gdm|g" "/usr/share/calamares/modules/${file}.conf"
+    fi
+done
+