[Dbconfig-common-changes] dbconfig-common/dpkg config,1.23,1.24

seanius at haydn.debian.org seanius at haydn.debian.org
Mon Oct 10 20:53:22 CEST 2005


Update of /cvsroot/dbconfig-common/dbconfig-common/dpkg
In directory haydn:/org/alioth.debian.org/chroot/home/users/seanius/tmp/cvs-serv15910/dpkg

Modified Files:
	config 
Log Message:
various pgsql and multidb fixes


Index: config
===================================================================
RCS file: /cvsroot/dbconfig-common/dbconfig-common/dpkg/config,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- config	25 Aug 2005 13:43:03 -0000	1.23
+++ config	10 Oct 2005 18:53:17 -0000	1.24
@@ -89,7 +89,7 @@
 		# if the dbtype is hardcoded (using config.mysql, etc), use that
 		if [ "$dbc_hardcoded_dbtype" ]; then
 			dbc_dbtype=$dbc_hardcoded_dbtype
-		# if the dbtype is already set, don't bother
+		# if dbc_dbtype is set (from above or in conf), don't bother
 		elif [ "$dbc_dbtype" ]; then
 			true
 		# else see if they've already told us what to use, use that
@@ -120,7 +120,13 @@
 			done
 
 			# now that we're done with that, actually do the debconf stuff
+
 			db_subst $dbc_package/database-type database_types "$dbc_dbtypes"
+			# if dbc_dbtype is already set (from conf file) then
+			# use that as a default, otherwise use our best guess
+			if [ "$dbc_dbtype" ]; then
+				default_dbtype="$dbc_dbtype"
+			fi
 			db_set  $dbc_package/database-type "$default_dbtype"
 			db_input high $dbc_package/database-type || true
 		fi
@@ -262,11 +268,13 @@
 	# state 8 - pgsql auth stuff, part 2
 	8)
 		if [ "$dbc_dbtype" = "pgsql" ]; then
-			# default the user auth method to the admin method
 			db_get $dbc_package/pgsql/authmethod-admin
 			authmethod_admin="$RET"
-
-			db_set $dbc_package/pgsql/authmethod-user "$authmethod_admin"
+			# default the user auth method to the admin method
+			# ...but only if they haven't set one already
+			if [ ! "$dbc_authmethod_user" ]; then
+				db_set $dbc_package/pgsql/authmethod-user "$authmethod_admin"
+			fi
 			db_input low $dbc_package/pgsql/authmethod-user || true
 		fi
 	;;




More information about the Dbconfig-common-changes mailing list