source: pkg/raul/main/evolution/trunk/debian/evolution.preinst @ 7139

Revision 6895, 700 bytes checked in by alanbach-guest, 4 years ago (diff)
  • Sync'd with Debian 2.30.3-1
Line 
1#! /bin/sh
2set -e
3
4. /usr/share/debconf/confmodule
5
6error_msg() {
7  db_title Upgrading evolution
8  db_fset evolution/needs_shutdown seen false
9  db_input high evolution/needs_shutdown || true
10  db_go
11}
12
13upgrade_check() {
14  seen=0
15  while pgrep -fx 'evolution|/usr/lib/evolution/.*/evolution-exchange-storage|/usr/lib/evolution/evolution-data-server-.*' > /dev/null; do
16    error_msg
17    seen=$(($seen + 1))
18    if [ $seen = 3 ]; then
19      db_stop
20      echo "Evolution is still running, aborting..."
21      exit 1
22    fi
23  done
24
25  db_stop
26  echo "No more Evolution instances running, proceeding with the upgrade..."
27}
28
29if dpkg --compare-versions "$2" lt-nl 2.24; then
30  upgrade_check
31fi
32
33#DEBHELPER#
Note: See TracBrowser for help on using the repository browser.