[interchange-cvs] interchange - racke modified 3 files

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Wed Jan 12 17:02:00 EST 2005


User:      racke
Date:      2005-01-12 22:02:00 GMT
Modified:  debian   interchange-cat-standard.config
Modified:           interchange-cat-standard.postinst
Modified:           interchange-cat-standard.templates
Log:
allow selection of RDBMS for demo catalog

Revision  Changes    Path
2.3       +4 -1      interchange/debian/interchange-cat-standard.config


rev 2.3, prev_rev 2.2
Index: interchange-cat-standard.config
===================================================================
RCS file: /var/cvs/interchange/debian/interchange-cat-standard.config,v
retrieving revision 2.2
retrieving revision 2.3
diff -u -r2.2 -r2.3
--- interchange-cat-standard.config	19 Oct 2004 10:41:40 -0000	2.2
+++ interchange-cat-standard.config	12 Jan 2005 22:02:00 -0000	2.3
@@ -1,6 +1,6 @@
 #! /bin/sh -e
 #
-# Copyright 2001,2002,2003,2004 by Stefan Hornburg (Racke) <racke at linuxia.de>
+# Copyright 2001,2002,2003,2004,2005 by Stefan Hornburg (Racke) <racke at linuxia.de>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,7 +52,10 @@
 db_input medium interchange-cat-standard/purge  || [ $? -eq 30 ]
 db_go
 
+# database parameters
 db_input high interchange-cat-standard/dbtype || [ $? -eq 30 ]
+db_go
+db_input high interchange-cat-standard/dbname || [ $? -eq 30 ]
 db_go
 
 db_input high interchange-cat-standard/username || [ $? -eq 30 ]



2.2       +17 -2     interchange/debian/interchange-cat-standard.postinst


rev 2.2, prev_rev 2.1
Index: interchange-cat-standard.postinst
===================================================================
RCS file: /var/cvs/interchange/debian/interchange-cat-standard.postinst,v
retrieving revision 2.1
retrieving revision 2.2
diff -u -r2.1 -r2.2
--- interchange-cat-standard.postinst	3 Aug 2004 09:10:38 -0000	2.1
+++ interchange-cat-standard.postinst	12 Jan 2005 22:02:00 -0000	2.2
@@ -1,6 +1,6 @@
 #! /bin/sh -e
 #
-# Copyright 2001,2004 by Stefan Hornburg (Racke) <racke at linuxia.de>
+# Copyright 2001,2004,2005 by Stefan Hornburg (Racke) <racke at linuxia.de>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -76,8 +76,23 @@
     LOCALES=`echo "$RET" | sed -e 's/, /,/'`
 	db_get interchange-cat-standard/defaultlocale
 	DEFAULTLOCALE=$RET
+	# determine database parameters
+	MYSQL=0
+	PGSQL=0
+	SQLDSN=
+	db_get interchange-cat-standard/dbname
+	DBNAME="$RET"
+	db_get interchange-cat-standard/dbtype
+	if [ "$RET" = "MySQL" ]; then
+		MYSQL=1
+		SQLDSN="dbi:mysql:$DBNAME"
+	elif [ "$RET" = "PostgreSQL" ]; then
+		PGSQL=1
+		SQLDSN="dbi:Pg:dbname=$DBNAME"
+	fi
+
 	SERVERNAME=`hostname --fqdn 2>/dev/null || echo localhost`
-	MVC_ENABLESECURE=1 MVC_UISECURE=1 MVC_SUPERUSER="$UI_SUPERUSER" MVC_CRYPTPW="$UI_PASSWORD" MVC_LOCALES="$LOCALES" MVC_DEFAULTLOCALE="$DEFAULTLOCALE" MVC_SKIP_ADD_GLOBAL_USERTAG=1 /usr/bin/makecat \
+	MVC_ENABLESECURE=1 MVC_UISECURE=1 MVC_SUPERUSER="$UI_SUPERUSER" MVC_CRYPTPW="$UI_PASSWORD" MVC_LOCALES="$LOCALES" MVC_DEFAULTLOCALE="$DEFAULTLOCALE" MVC_SKIP_ADD_GLOBAL_USERTAG=1 MVC_MYSQL=$MYSQL MVC_PGSQL=$PGSQL MVC_SQLDSN="$SQLDSN" MVC_SQLUSER=interchange /usr/bin/makecat \
 		-F \
 		-l /var/log/interchange/makecat.log \
 		--demotype=$CATALOG \



2.3       +7 -1      interchange/debian/interchange-cat-standard.templates


rev 2.3, prev_rev 2.2
Index: interchange-cat-standard.templates
===================================================================
RCS file: /var/cvs/interchange/debian/interchange-cat-standard.templates,v
retrieving revision 2.2
retrieving revision 2.3
diff -u -r2.2 -r2.3
--- interchange-cat-standard.templates	19 Oct 2004 10:41:40 -0000	2.2
+++ interchange-cat-standard.templates	12 Jan 2005 22:02:00 -0000	2.3
@@ -68,5 +68,11 @@
 Type: select
 __Choices: PostgreSQL, MySQL
 Default: MySQL
-_Description: What database should be used for the demo catalog ?
+_Description: Which DBMS should be used for the demo catalog ?
  Please select the database type.
+
+Template: interchange-cat-standard/dbname
+Type: string
+Default: standard
+_Description: Database name
+ Please select the name of the database.








More information about the interchange-cvs mailing list