home · contact · privacy
Fix video hardware acceleration difference between X200s, T450s.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 12 Dec 2015 15:47:45 +0000 (16:47 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 12 Dec 2015 15:47:45 +0000 (16:47 +0100)
jessie_postinstall.sh

index e6fd2e551628d609b44416b8fc51988d4b2debaa..007d594a4ed8605347a2c83238997bb46b941df7 100755 (executable)
@@ -65,10 +65,18 @@ echo 'deb http://security.debian.org/ jessie/updates main contrib non-free' \
 echo 'deb http://ftp.debian.org/debian/ jessie-updates main contrib non-free' \
     >> /etc/apt/sources.list
 if [ "$1" = "thinkpad" ]; then
-    echo 'deb http://ftp.debian.org/debian/ testing main contrib non-free' >> /etc/apt/sources.list
-    echo 'deb http://security.debian.org/ testing/updates main contrib non-free' >> /etc/apt/sources.list
-    echo 'deb http://ftp.debian.org/debian/ testing-updates main contrib non-free' >> /etc/apt/sources.list
-    echo 'APT::Default-Release "stable";' >> /etc/apt/apt.conf.d/99defaultrelease
+    if [ "$2" = "T450s" ]; then
+        echo 'deb http://ftp.debian.org/debian/ jessie-backports main contrib' \
+' non-free' >> /etc/apt/sources.list
+    fi
+    echo 'deb http://ftp.debian.org/debian/ testing main contrib non-free' \
+        >> /etc/apt/sources.list
+    echo 'deb http://security.debian.org/ testing/updates main contrib' \
+' non-free' >> /etc/apt/sources.list
+    echo 'deb http://ftp.debian.org/debian/ testing-updates main contrib' \
+' non-free' >> /etc/apt/sources.list
+    echo 'APT::Default-Release "stable";' \
+        >> /etc/apt/apt.conf.d/99defaultrelease
 fi
 dhclient eth0
 apt-get update
@@ -203,9 +211,13 @@ elif [ "$1" = "thinkpad" ]; then
     apt-get -y install xserver-xorg xinit xterm i3 i3status dmenu redshift
 
     # Set up OpenGL and hardware acceleration.
-    apt-get -y install libgl1-mesa-dri
-    apt-get -y install i965-va-driver
-    usermod -aG video plom
+    if [ "$1" = "X220s" ]; then
+        apt-get -y install libgl1-mesa-dri
+        apt-get -y install i965-va-driver
+        usermod -aG video plom
+    elif [ "$2" = "T450s" ]; then
+        apt-get -y -t jessie-backports install xserver-xorg-video-intel
+    fi
 
     # Install xrandr.
     apt-get -y install x11-xserver-utils