summaryrefslogtreecommitdiff
path: root/debian/preinst
blob: 99f75dbd9ebe78e5b29a515b962d59298ae2ccb9 (plain)
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
#!/bin/sh

set -e

. /usr/share/debconf/confmodule

if [ "$1" = upgrade ]; then
  if dpkg --compare-versions "$2" lt-nl 4.0.3-7 && \
     dpkg --compare-versions "$2" gt 4.0.3-3; then
    if ! test -L /tmp/.screen && test -d /tmp/.screen && test -n "`find /tmp/.screen -type p 2>/dev/null`"; then
      ln -s /tmp/.screen /var/run/screen
    fi
  fi
  if pidof SCREEN >/dev/null && test '!' -e /tmp/screen && dpkg --compare-versions "$2" lt-nl 4.1.0~; then
      if cp -pnT /usr/bin/screen /tmp/ ; then
	  echo Copied /usr/bin/screen to /tmp/screen
	  db_input high screen/410-upgrade || true
	  db_go || true
      else
	  echo Copying /usr/bin/screen to /tmp/screen failed
	  db_input high screen/403-copy-failed || true
	  db_go || true
      fi
  fi
fi

#DEBHELPER#