diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2012-06-10 03:30:56 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2012-06-10 04:44:04 +0200 |
commit | 0b69324191b1e3e5e4a1c206437f027f4a365be5 (patch) | |
tree | 0f40a8edf84a72b77c99b1db3a1878abc638f6f1 /debian/preinst | |
parent | 7d2ca27976054878a90a32293159ecdb9324212c (diff) | |
download | screen-0b69324191b1e3e5e4a1c206437f027f4a365be5.tar.gz |
First version which backs up old /usr/bin/screen to /tmp/screen
Closes: #644788
Diffstat (limited to 'debian/preinst')
-rw-r--r-- | debian/preinst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/debian/preinst b/debian/preinst index 218840d..99f75db 100644 --- a/debian/preinst +++ b/debian/preinst @@ -2,6 +2,8 @@ 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 @@ -9,6 +11,17 @@ if [ "$1" = upgrade ]; 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# |