[phpBB] svn: r57 - trunk/phpbb2

jeroen at wolffelaar.nl jeroen at wolffelaar.nl
Mon Feb 9 13:44:01 CET 2004


Author: jeroen
Date: 2004-02-09 13:43:17 +0100 (Mon, 09 Feb 2004)
New Revision: 57

Added:
   trunk/phpbb2/phpbb2.postrm
Modified:
   trunk/phpbb2/TODO
   trunk/phpbb2/phpbb2-conf-mysql.postinst
   trunk/phpbb2/phpbb2-conf-mysql.postrm
Log:
- Fix ucf handling on disappeared /etc/phpbb2/config.php
- Fix ucf reading from /dev/tty in stead of debconf trouble
- Correctly purge ucf and also the config files, in phpbb2 rather than
  phpbb2-conf-mysql


Modified: trunk/phpbb2/TODO
===================================================================
--- trunk/phpbb2/TODO	2004-02-08 19:23:43 UTC (rev 56)
+++ trunk/phpbb2/TODO	2004-02-09 12:43:17 UTC (rev 57)
@@ -13,6 +13,7 @@
 
 Normal TODO's:
 - Multiboard security okay? Yes.
+- Report bug about ucf --three-way going crazy on disappeared files
 - PostgreSQL setup, also the default SQL needs to be fixed analog to MySQL
 - Purge user on package purge (but not DB, or ask about DB, do note about that)
 - Use UCF on apache.conf (--three-way)

Modified: trunk/phpbb2/phpbb2-conf-mysql.postinst
===================================================================
--- trunk/phpbb2/phpbb2-conf-mysql.postinst	2004-02-08 19:23:43 UTC (rev 56)
+++ trunk/phpbb2/phpbb2-conf-mysql.postinst	2004-02-09 12:43:17 UTC (rev 57)
@@ -140,7 +140,15 @@
 	?>
 	NEWCONFIG
 
-	ucf --three-way $tmpfile /etc/phpbb2/config.php
+	# If /etc/phpbb2/config.php disappeared, purge it from ucf too, otherwise
+	# ucf will go crazy
+	if [ ! -e /etc/phpbb2/config.php ]; then
+		ucf --purge /etc/phpbb2/config.php
+	fi
+
+	# because of debconf, make ucf read from /dev/tty
+	ucf --three-way $tmpfile /etc/phpbb2/config.php < /dev/tty
+		
 	rm -f $tmpfile
 
 # fix permissions

Modified: trunk/phpbb2/phpbb2-conf-mysql.postrm
===================================================================
--- trunk/phpbb2/phpbb2-conf-mysql.postrm	2004-02-08 19:23:43 UTC (rev 56)
+++ trunk/phpbb2/phpbb2-conf-mysql.postrm	2004-02-09 12:43:17 UTC (rev 57)
@@ -23,8 +23,6 @@
 
 case "$1" in
        purge)
-	   	rm -rf /etc/phpbb2
-		
 		db_reset phpbb2/nodbpurge || true
 		db_input high phpbb2/nodbpurge || true
 		db_go

Copied: trunk/phpbb2/phpbb2.postrm (from rev 56, trunk/phpbb2/phpbb2-conf-mysql.postrm)
===================================================================
--- trunk/phpbb2/phpbb2-conf-mysql.postrm	2004-02-08 19:23:43 UTC (rev 56)
+++ trunk/phpbb2/phpbb2.postrm	2004-02-09 12:43:17 UTC (rev 57)
@@ -0,0 +1,46 @@
+#! /bin/sh
+# postrm script for phpbb2
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+. /usr/share/debconf/confmodule
+
+db_version 2.0
+
+case "$1" in
+       purge)
+	    ucf --purge /etc/phpbb2/config.php
+		rm -rf /etc/phpbb2
+
+	   ;;
+	   remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0





More information about the phpBB-l mailing list