Initial release of Maemo 5 port of gnuplot
[gnuplot] / debian / gnuplot-nox.postinst
diff --git a/debian/gnuplot-nox.postinst b/debian/gnuplot-nox.postinst
new file mode 100644 (file)
index 0000000..ead2f26
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh 
+
+# Author: Thimo Neubauer <thimo@debian.org>
+# $Id: postinst,v 1.13 2002/09/08 19:44:17 thimo Exp $
+
+set -e
+
+#
+## delete config-data from the old suid-question
+#
+
+# in pre-debconf-times gnuplot saved the answer in /etc/gnuplot.conf
+if [ -e /etc/gnuplot.conf ]; then
+    rm /etc/gnuplot.conf
+fi
+
+# if debconf is installed, try to remove old question
+if [ -e /usr/share/debconf/confmodule ]; then
+    # include debconf stuff
+    . /usr/share/debconf/confmodule
+
+    # remove template/value a previous gnuplot version may have left
+    db_purge
+fi
+
+# also delete the eventual statoverride (if set)
+set +e
+dpkg-statoverride --remove /usr/bin/gnuplot > /dev/null 2>&1
+set -e
+
+# ... and finally reset a possibly set suid-flag
+chmod 755 /usr/bin/gnuplot
+
+#DEBHELPER#