Whamcloud - gitweb
e2fsck, tune2fs: fix post-2038 support for s_lastcheck
[tools/e2fsprogs.git] / debian / e2fsprogs.preinst
index 97d2f9c..bfa9f6b 100644 (file)
@@ -1,24 +1,18 @@
 #!/bin/sh
 
-dpkg --assert-support-predepends 2> /dev/null
+# Abort on error.
+set -e
 
-case $? in
- 0) ;; # fine, supported
- 1) exit 1 ;; # dpkg writes an error message to stdio
- 2) cat <<EOT
-This package requires features of dpkg unavailable in this version.
-Please upgrade to a more recent version (>=1.1.0) of dpkg.
-EOT
-    exit 1 ;; # dpkg didn't recognise the option
- *) exit 2 ;;
-esac
+PKG=e2fsprogs
+DOCLNK=/usr/share/doc/$PKG
+if test "$1" = upgrade \
+    -a -L $DOCLNK
+then
+    rm $DOCLNK
+fi
 
-#  # turn around bug in dpkg (Bug#17624)
-#  if [ -L /usr/doc/e2fsprogs ]
-#  then
-#      echo 'preinst: removing buggy /usr/doc/e2fsprogs symlink (Bug#17624)'
-#      rm -f /usr/doc/e2fsprogs
-#  fi
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
 
 #DEBHELPER#