Dodan divert za squirrelmail/functions/strings.php zbog problema s PHP/SquirrelMail.
[squirrelmail-cn.git] / debian / preinst
index 6396ffb..cfcffc8 100644 (file)
@@ -2,29 +2,34 @@
 
 set -e
 
-case "$1" in
-       install|upgrade)
-       ;;
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
 
-       abort-upgrade)
-       exit 0
-       ;;
 
-       *)
-       echo "preinst called with unknown argument '$1'" >&2
-       exit 1
-       ;;
+case "$1" in
+  install|upgrade)
+    dpkg-divert --package squirrelmail-cn --add --rename \
+      --divert /usr/share/squirrelmail/functions/strings.php.squirrelmail \
+        /usr/share/squirrelmail/functions/strings.php
+    ;;
+
+  abort-upgrade)
+    ;;
+
+  *)
+    echo "preinst called with unknown argument \`$1'" >&2
+    exit 1
+    ;;
 esac
 
-# leftover from 1.2.6-2
-if dpkg-divert --list | \
-       egrep -q 'diversion of .*functions/display_messages.php .* by squirrelmail-cn'; then
-
-       rm -f /usr/share/squirrelmail/functions/display_messages.php
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
 
-       dpkg-divert --package squirrelmail-cn --remove --rename --divert \
-               /usr/share/squirrelmail/functions/display_messages.php.divert-cn \
-               /usr/share/squirrelmail/functions/display_messages.php
-fi
+#DEBHELPER#
 
 exit 0