Ubuntu Pastebin

Paste from ken at Mon, 10 Jul 2017 14:09:27 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
=== modified file 'debian/ubuntu-session.postinst'
--- debian/ubuntu-session.postinst	2017-07-06 14:57:03 +0000
+++ debian/ubuntu-session.postinst	2017-07-10 14:07:56 +0000
@@ -11,23 +11,24 @@
 DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
 
 if [ "$1" = configure ]; then
-  RET=`grep -c gdm3 $DEFAULT_DISPLAY_MANAGER_FILE || true`
-  if [ $RET -gt 0 ]; then
-    # Nothing to do
-    exit 0;
-  fi
-
-  TRANSITION=false
-  for file in /var/lib/AccountsService/users/*; do
-    RET=`grep -c 'XSession=ubuntu' $file || true`
+  if dpkg --compare-versions "$2" lt "3.24.1-0ubuntu10~"; then
+    RET=`grep -c lightdm $DEFAULT_DISPLAY_MANAGER_FILE || true`
     if [ $RET -gt 0 ]; then
-      TRANSITION=true
+      TRANSITION=false
+      for file in /var/lib/AccountsService/users/*; do
+        RET=`grep -c 'XSession=ubuntu' $file || true`
+        if [ $RET -gt 0 ]; then
+          TRANSITION=true
+        fi
+      done
+
+      if [ "$TRANSITION" = true ]; then
+        DEFAULT_DISPLAY_MANAGER_DIR=$(dirname $DEFAULT_DISPLAY_MANAGER_FILE)
+        test -e $DEFAULT_DISPLAY_MANAGER_DIR || mkdir -p $DEFAULT_DISPLAY_MANAGER_DIR
+        touch $DEFAULT_DISPLAY_MANAGER_FILE.debconf-transition
+      fi
     fi
-  done
-
-  if [ "$TRANSITION" = true ]; then
-    DEFAULT_DISPLAY_MANAGER_DIR=$(dirname $DEFAULT_DISPLAY_MANAGER_FILE)
-    test -e $DEFAULT_DISPLAY_MANAGER_DIR || mkdir -p $DEFAULT_DISPLAY_MANAGER_DIR
-    touch $DEFAULT_DISPLAY_MANAGER_FILE.debconf-transition
   fi
 fi
+
+#DEBHELPER#
Download as text