Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > cd57df62662e227da21706312d1dfa34 > files > 6

initscripts-9.55-13.mga5.src.rpm

From 811c3dfefa22540e1cc9d480307dfd1ab71de520 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Thu, 11 Sep 2014 14:56:30 +0100
Subject: [PATCH 104/104] Kill off prefdm/lookupdm

These are no longer appropriate and display managers should be started
by the appropriate systemd unit.

We should have code that enables the appropriate unit automatically
on install now that /etc/sysconfig/desktop has been deprecated.
---
 Makefile                        |  5 ---
 display-manager-failure-message | 26 --------------
 mandriva/Makefile               |  3 +-
 mandriva/lookupdm               | 36 -------------------
 prefdm                          | 79 -----------------------------------------
 sysconfig.txt                   |  8 -----
 6 files changed, 1 insertion(+), 156 deletions(-)
 delete mode 100755 display-manager-failure-message
 delete mode 100755 mandriva/lookupdm
 delete mode 100755 prefdm

diff --git a/Makefile b/Makefile
index 1248e67..1c381c6 100644
--- a/Makefile
+++ b/Makefile
@@ -40,11 +40,6 @@ install:
 	install -m 644 sysctl.conf.README $(ROOT)/etc/sysctl.conf
 	ln -s ../sysctl.conf $(ROOT)/etc/sysctl.d/99-sysctl.conf
 
-	mkdir -p $(ROOT)/etc/X11
-	install -m755 prefdm $(ROOT)/etc/X11/prefdm
-	mkdir -p $(ROOT)/usr/bin
-	install -m755 display-manager-failure-message $(ROOT)/usr/bin/display-manager-failure-message
-
 	install -m755 -d $(ROOT)/etc/rc.d $(ROOT)/etc/sysconfig
 	cp -af rc.d/init.d $(ROOT)/etc/rc.d/
 	install -m644 sysconfig/debug sysconfig/init sysconfig/netconsole sysconfig/readonly-root $(ROOT)/etc/sysconfig/
diff --git a/display-manager-failure-message b/display-manager-failure-message
deleted file mode 100755
index 2ba4d2d..0000000
--- a/display-manager-failure-message
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-echo >&2
-echo "Sorry, but there has been a problem starting your graphical display." >&2
-echo >&2
-echo "In order to debug your problem we will automatically switch to a text-based" >&2
-echo "login screen from where you can login as the root user and run the 'drakx11'" >&2
-echo "utility to configure your graphical display." >&2
-echo >&2
-echo "After configuration, you can restart your graphical environment via the command:" >&2
-echo "  systemctl default" >&2
-echo "at which point you will be automatically logged out while the graphical system" >&2
-echo "starts." >&2
-echo >&2
-echo "If you would prefer to avoid this message and go straight to a text-based login" >&2
-echo "system at boot, simply change the symlink /etc/systemd/system/default.target to" >&2
-echo "point instead to /lib/systemd/system/multi-user.target" >&2
-echo >&2
-echo "Good luck :)" >&2
-echo >&2
-echo "Press any key." >&2
-read -n 1
-
-echo >&2
-echo "Switching to multi-user.target..." >&2
-systemctl isolate multi-user.target
diff --git a/mandriva/Makefile b/mandriva/Makefile
index 1b7e941..7d1910a 100644
--- a/mandriva/Makefile
+++ b/mandriva/Makefile
@@ -6,7 +6,7 @@ SVNCOPY = $(shell LC_ALL=C svn info ..|fgrep 'URL:'|cut -f 2 -d\ )
 ROOT=/
 LOCALSRPM=/SRPMS/main/release
 ARCH := $(shell uname -m)
-SH := $(shell echo *.sh) listhome $(shell echo mandrake_*) rc.modules lookupdm mdv-network-event network-up
+SH := $(shell echo *.sh) listhome $(shell echo mandrake_*) rc.modules mdv-network-event network-up
 mandir=/usr/share
 VERSION:=$(shell rpm -q --qf '%{VERSION}\n' --specfile ../$(NAME).spec | head -n 1)
 RELEASE:=$(shell rpm -q --qf '%{RELEASE}\n' --specfile ../$(NAME).spec | head -n 1)
@@ -43,7 +43,6 @@ install: all check
 	install -m755 if{up,down}-hso $(ROOT)/etc/sysconfig/network-scripts/
 	install -m755 rc.modules $(ROOT)/etc/
 	install -m644 modules $(ROOT)/etc/
-	install -m755 lookupdm $(ROOT)/etc/X11/
 	for profile in {inputrc,tmpdir}.{c,}sh; do \
 	  install -m644 $$profile $(ROOT)/etc/profile.d/$(PROFILE_LEVEL)$$profile; \
 	done
diff --git a/mandriva/lookupdm b/mandriva/lookupdm
deleted file mode 100755
index 8e8287e..0000000
--- a/mandriva/lookupdm
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-#---------------------------------------------------------------
-# Project         : Mageia
-# Module          : initscripts
-# File            : lookupdm
-# Version         : $Id$
-# Author          : Frederic Lepied
-# Created On      : Mon May 30 08:50:45 2005
-# Purpose         : Lookup the display manager according to the
-#                 argument or find the first available one.
-#---------------------------------------------------------------
-
-TARGET_DM=$1
-DIR=/usr/share/X11/dm.d
-
-if [ -n "$TARGET_DM" ]; then
-    for f in `grep -l "^NAME=$TARGET_DM$" $DIR/*.conf`; do
-	EXEC=
-	eval `grep '^EXEC=' "$f"`
-	if [ -x "$EXEC" ]; then
-	    echo $EXEC
-	    exit 0
-	fi
-    done
-fi
-
-for f in $DIR/*.conf; do
-    EXEC=
-    eval `grep '^EXEC=' "$f"`
-    if [ -x "$EXEC" ]; then
-	echo $EXEC
-	exit 0
-    fi
-done
-
-# lookupdm.sh ends here
diff --git a/prefdm b/prefdm
deleted file mode 100755
index 6d4be72..0000000
--- a/prefdm
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-HOME=/root
-export HOME
-
-# xdm-like program are launched from the console, however, the locale-setting
-# can be done in a way that console is not localize, while X11 is.
-# That is handled by the lang.sh script, depending on the existance of
-# $DISPLAY or $DESKTOP variable. Now that $DESKTOP is defined resource lang.sh
-[ -z "$DESKTOP" ] && DESKTOP=dummy_DESKTOP_variable
-# We need to source this so that the login screens get translated
-. /etc/profile.d/10lang.sh
-[ "$DESKTOP" = "dummy_DESKTOP_variable" ] && unset DESKTOP
-
-# Try autologin first, if wanted...
-if [ -f /etc/sysconfig/autologin -a -x /usr/sbin/autologin ]; then
-	. /etc/sysconfig/autologin
-	if [ -n "$USER" -a "$AUTOLOGIN" = yes ]; then
-	    # shut down boot splash
-	    [ -x /bin/plymouth ] && /bin/plymouth quit
-	    /usr/sbin/autologin &
-	    echo -n $$ > /var/lock/subsys/dm
-	    wait $!
-	fi
-fi
-
-# we have to assume that /etc/sysconfig/desktop has two variables, DESKTOP
-# and DISPLAYMANAGER because administors may prefer a specific DM regardless
-# of desktops.
-# DISPLAYMANAGER is referenced by this script, and DESKTOP is referenced
-# as system-wide default by /etc/X11/Xsession script only when X-session
-# is opened by "startx" command. 
-# when DMs open an X-session, they send DESKTOP, which is in this case
-# directly selected by users, as a commandline argument of /etc/X11/Xsession.
-# actually Xsession script is only able to know by existance of its first
-# argument whether it is called by DM or "startx". see the logic
-# in /etc/X11/Xsession.
-# If DISPLAYMANAGER is not defined, then assume that it is the same as DESKTOP
-dm=
-if [ -f /etc/sysconfig/desktop ]; then
-	. /etc/sysconfig/desktop >/dev/null 2>&1
-	[ -z "$DISPLAYMANAGER" ] && DISPLAYMANAGER=$DESKTOP
-	if [ "$DISPLAYMANAGER" = "GDM" -o "$DISPLAYMANAGER" = "gdm" -o "$DISPLAYMANAGER" = "GNOME" -o "$DISPLAYMANAGER" = "gnome" -o "$DISPLAYMANAGER" = "Gnome" ]; then
-	    dm=GNOME
-	elif [ "$DISPLAYMANAGER" = "KDM" -o "$DISPLAYMANAGER" = "kdm" -o "$DISPLAYMANAGER" = "KDE" -o "$DISPLAYMANAGER" = "kde" ]; then
-	    dm=KDM
-	elif [ "$DISPLAYMANAGER" = "WDM" -o "$DISPLAYMANAGER" = "wdm" ] ; then
-	    dm=WDM
-	    plymouth_quit=yes
-	elif [ "$DISPLAYMANAGER" = "XDM" -o "$DISPLAYMANAGER" = "xdm" ] ; then
-	    dm=XDM
-	    plymouth_quit=yes
-	elif [ "$DISPLAYMANAGER" = "SLiM" -o "$DISPLAYMANAGER" = "slim" ] ; then
-	    dm=SLiM
-	    plymouth_quit=yes
-	elif [ "$DISPLAYMANAGER" = "LXDM" -o "$DISPLAYMANAGER" = "lxdm" ] ; then
-	    dm=LXDM
-	elif [ -n "$DISPLAYMANAGER" ]; then
-	    dm=$DISPLAYMANAGER
-	    plymouth_quit=yes
-	fi
-fi
-
-# shut down boot splash
-[ -x /bin/plymouth ] && [ "x$plymouth_quit" = "xyes" ] && /bin/plymouth quit
-
-shopt -s execfail
-
-preferred=`/etc/X11/lookupdm "$dm"`
-[ -n "$preferred" ] && exec $preferred "$@" >/dev/null 2>&1 </dev/null
-
-# Fallbacks, in order
-exec gdm "$@" >/dev/null 2>&1 </dev/null
-exec kdm "$@" >/dev/null 2>&1 </dev/null
-
-# catch all exit error
-[ -x /bin/plymouth ] && /bin/plymouth quit
-exit 1
diff --git a/sysconfig.txt b/sysconfig.txt
index 72e48ed..711a6f3 100644
--- a/sysconfig.txt
+++ b/sysconfig.txt
@@ -82,14 +82,6 @@ Generic options:
     SRM=true on alpha only indicates the SRM 1900 epoch is in
       effect; otherwise the normal Unix epoch is assumed.
     
-/etc/sysconfig/desktop:
-
-  DESKTOP=GNOME|KDE
-     This determines the default desktop for new users.
-  DISPLAYMANAGER=GNOME|KDE|KDM|XDM
-     This determines display manager started by /etc/X11/prefdm,
-     independent of the desktop.
-
 /etc/sysconfig/init:
 
   BOOTUP=<some bootup mode>
-- 
2.1.0