~ubuntu-branches/ubuntu/wily/php-memcache/wily

« back to all changes in this revision

Viewing changes to debian/php5-memcache.preinst

  • Committer: Package Import Robot
  • Author(s): Sergey B Kirpichev
  • Date: 2012-04-07 23:27:49 UTC
  • mfrom: (2.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20120407232749-k2wwc3mfrink59h7
* Install README and example.php
* Use php5{en,dis}mod for conffile handling (Closes: #667775)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
 
2
 
2
3
set -e
3
4
 
4
 
if test "$1" = "upgrade"
5
 
then
6
 
  if dpkg --compare-versions "$2" lt 3.0.6-1
7
 
  then
8
 
    if which ucf >/dev/null 2>&1
9
 
    then
10
 
        ucf --purge /etc/php5/conf.d/memcache.ini
11
 
    fi
12
 
  fi
13
 
fi
 
5
case "$1" in
 
6
  install|upgrade)
 
7
    if [ -n "$2" ] && dpkg --compare-versions "$2" lt 3.0.6-1
 
8
    then
 
9
      ucf --purge /etc/php5/conf.d/memcache.ini
 
10
    fi
 
11
    if test -e /etc/php5/conf.d/memcache.ini
 
12
    then
 
13
      sed s/^\;extension/extension/ -i /etc/php5/conf.d/memcache.ini
 
14
      dpkg-maintscript-helper mv_conffile /etc/php5/conf.d/memcache.ini \
 
15
          /etc/php5/mods-available/memcache.ini 3.0.6-4 -- "$@"
 
16
      rm -f /etc/php5/conf.d/memcache.ini
 
17
    fi
 
18
    ;;
 
19
  abort-upgrade)
 
20
    ;;
 
21
  *)
 
22
    echo "preinst called with unknown argument \`$1'" >&2
 
23
    exit 1
 
24
    ;;
 
25
esac
14
26
 
15
27
#DEBHELPER#
16
28