svn commit: r718511 - /ofbiz/trunk/debian/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r718511 - /ofbiz/trunk/debian/

doogie-3
Author: doogie
Date: Mon Nov 17 22:58:40 2008
New Revision: 718511

URL: http://svn.apache.org/viewvc?rev=718511&view=rev
Log:
Preparing the helper scripts and files for framework.

Added:
    ofbiz/trunk/debian/ofbiz-framework.config
      - copied, changed from r709334, ofbiz/trunk/debian/ofbiz.config
    ofbiz/trunk/debian/ofbiz-framework.dirs
      - copied unchanged from r684387, ofbiz/trunk/debian/ofbiz.dirs
    ofbiz/trunk/debian/ofbiz-framework.links
      - copied unchanged from r684387, ofbiz/trunk/debian/ofbiz.links
    ofbiz/trunk/debian/ofbiz-framework.ofbiz.default
      - copied unchanged from r689908, ofbiz/trunk/debian/ofbiz.default
    ofbiz/trunk/debian/ofbiz-framework.ofbiz.init
      - copied unchanged from r689908, ofbiz/trunk/debian/ofbiz.init
    ofbiz/trunk/debian/ofbiz-framework.postinst
      - copied, changed from r709334, ofbiz/trunk/debian/ofbiz.postinst
    ofbiz/trunk/debian/ofbiz-framework.postrm
      - copied unchanged from r709335, ofbiz/trunk/debian/ofbiz.postrm
    ofbiz/trunk/debian/ofbiz-framework.prerm
      - copied unchanged from r709336, ofbiz/trunk/debian/ofbiz.prerm
    ofbiz/trunk/debian/ofbiz-framework.templates
      - copied, changed from r689908, ofbiz/trunk/debian/ofbiz.templates

Copied: ofbiz/trunk/debian/ofbiz-framework.config (from r709334, ofbiz/trunk/debian/ofbiz.config)
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-framework.config?p2=ofbiz/trunk/debian/ofbiz-framework.config&p1=ofbiz/trunk/debian/ofbiz.config&r1=709334&r2=718511&rev=718511&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz.config (original)
+++ ofbiz/trunk/debian/ofbiz-framework.config Mon Nov 17 22:58:40 2008
@@ -20,32 +20,22 @@
 
 . /usr/share/debconf/confmodule
 
+db_title OFBiz
 db_version 2.0
 db_capb backup
 #DEBHELPER#
-cat << _EOF_ > /dev/null
-if [ "$1" = configure ]; then
- db_fget ofbiz/database-type seen || true
- if [ "$RET" != false ]; then
- db_set ofbiz/database-type pgsql
- db_fset ofbiz/database-type seen false
- fi
- for dbtype in pgsql mysql; do
- db_fget ofbiz/$dbtype/method seen || true
- if [ "$RET" != false ]; then
- db_set ofbiz/$dbtype/method tcp/ip
- db_fset ofbiz/$dbtype/method seen false
- fi
- done
-fi
-_EOF_
 
 if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
- dbc_dbtype="derby"
+ dbc_dbuser="ofbiz"
+ dbc_dbname="ofbiz"
+ dbc_dbtype="pgsql"
  dbc_dbtypes="pgsql, mysql, derby, hsql"
+ #dbc_authmethod_admin="ident"
  dbc_authmethod_user="password"
  . /usr/share/dbconfig-common/dpkg/config
+ set -x
  dbc_go ofbiz $@
+ set +x
 fi
 if [ -r "/etc/ofbiz/debconf.cfg" ]; then
  . "/etc/ofbiz/debconf.cfg"
@@ -58,15 +48,14 @@
  return 1;
 }
 ofbiz_readers="seed"
-ofbiz_from_email="[hidden email]"
 ofbiz_admin_port="10523"
 #env LANG=C LC_ALL=C sed -n -e 's/[^[:alnum:]]//g;p;q' < /dev/urandom | cut -b1-12
 if set_if ofbiz/admin-password-encrypted "$ofbiz_admin_password_encrypted"; then
  db_fset ofbiz/admin-password-encrypted seen true
 fi
-db_set ofbiz/admin-password ofbiz || true
+set -x
+#db_set ofbiz/admin-password ofbiz || true
 set_if ofbiz/readers "$ofbiz_readers" || true
-set_if ofbiz/from-email "$ofbiz_from_email" || true
 set_if ofbiz/admin-port "$ofbiz_admin_port" || true
 
 cmd="$1"
@@ -74,51 +63,53 @@
 
 case "$cmd" in
  (configure)
- import_question=ofbiz/import-additional-data
- reader_choices="demo, ext"
+ import_question=ofbiz/readers
  ;;
  (reconfigure)
  import_question=ofbiz/reimport-data
- reader_choices="seed, demo, ext"
  ;;
  (*)
  echo "Invalid command($cmd)" 1>&2
  exit 9
  ;;
 esac
+seen_admin_password_prompt="false"
+db_fget ofbiz/admin-password seen && seen_admin_password_prompt="$RET"
 case "$cmd" in
  (configure|reconfigure)
- db_subst ofbiz/readers choices "$reader_choices"
  STATE=0
  while :; do
  NEXT=$(($STATE + 1))
  case "$STATE" in
  (-1) exit 10
  ;;
- (0) if db_input medium ofbiz/admin-password; then
- db_set ofbiz/admin-password ''
- db_set ofbiz/admin-password-encrypted ''
- db_fset ofbiz/password-confirmation seen false
- else
- db_fset ofbiz/password-confirmation seen true
- db_get ofbiz/admin-password || true
- db_set ofbiz/password-confirmation "$RET"
- fi
+ (0) db_input medium ofbiz/admin-password || true
  ;;
  (1) password=""
  db_get ofbiz/admin-password && password="$RET"
- if ! [ "$password" ]; then
- db_input high ofbiz/empty-password-not-allowed || true
- NEXT=0
+ if [ "z" = "z$password" ]; then
+ if [ "$seen_admin_password_prompt" = "false" ]; then
+ db_set ofbiz/admin-password "ofbiz"
+ db_set ofbiz/password-confirmation "ofbiz"
+ password="ofbiz"
+ else
+ db_input high ofbiz/empty-password-not-allowed || true
+ NEXT=0
+ fi
+ else
+ seen_admin_password_prompt="true"
  fi
  ;;
- (2) db_input high ofbiz/password-confirmation || true
+ (2) if [ "$seen_admin_password_prompt" = "true" ]; then
+ db_input high ofbiz/password-confirmation || true
+ fi
  ;;
  (3) confirm=""
  db_get ofbiz/password-confirmation && confirm="$RET"
  if [ "$password" != "$confirm" ]; then
  db_input high ofbiz/mismatched-passwords || true
  NEXT=0
+ db_set ofbiz/admin-password ''
  db_fset ofbiz/admin-password seen false
  fi
  ;;
@@ -129,9 +120,7 @@
  db_input medium ofbiz/readers || true
  fi
  ;;
- (6) db_input medium ofbiz/from-email || true
- ;;
- (7) db_input low ofbiz/admin-port || true
+ (6) db_input low ofbiz/admin-port || true
  ;;
  (*) break
  ;;

Copied: ofbiz/trunk/debian/ofbiz-framework.postinst (from r709334, ofbiz/trunk/debian/ofbiz.postinst)
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-framework.postinst?p2=ofbiz/trunk/debian/ofbiz-framework.postinst&p1=ofbiz/trunk/debian/ofbiz.postinst&r1=709334&r2=718511&rev=718511&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz.postinst (original)
+++ ofbiz/trunk/debian/ofbiz-framework.postinst Mon Nov 17 22:58:40 2008
@@ -82,7 +82,6 @@
  if true; then
  xalan -q \
  -param reader "'$1'" \
- -param fromemail "'$ofbiz_from_email'" \
  -param password "'$ofbiz_password_encrypted'" \
  -param ofbizhome "'/usr/share/ofbiz'" \
  -xsl "/usr/share/ofbiz/support/override-data.xslt" \
@@ -153,6 +152,7 @@
 
 . /usr/share/debconf/confmodule
 . /usr/share/dbconfig-common/dpkg/postinst
+dbc_generate_include=sh:/etc/ofbiz/debconf.cfg
 dbc_go ofbiz "$@"
 if [ -e /etc/ofbiz/debconf.cfg ]; then
  ofbiz_admin_key=""
@@ -160,30 +160,38 @@
 else
  ofbiz_admin_key="$(get_random_chars 32)"
  ofbiz_readers=""
- ofbiz_from_email=""
  ofbiz_admin_port=""
 fi
 ofbiz_reseed=""
 case "$1" in
  (configure|reconfigure)
+ if [ "z" = "z$2" ]; then
+ ofbiz_reseed=1
+ ofbiz_import_readers=1
+ fi
  get ofbiz_readers ofbiz/readers ofbiz_import_readers ofbiz_reseed
+ if [ "z" = "z$ofbiz_readers" ]; then
+ ofbiz_readers="seed"
+ else
+ ofbiz_readers="seed,$ofbiz_readers"
+ fi
  ofbiz_readers="$(fix_readers "$ofbiz_readers")"
- get ofbiz_from_email ofbiz/from-email ofbiz_override_data ofbiz_reseed
  get ofbiz_admin_port ofbiz/admin-port
  if ! [ "$2" ]; then
  if ! getent passwd ofbiz 2>/dev/null >/dev/null; then
  adduser --quiet --group --no-create-home --system --home /var/lib/ofbiz ofbiz
  fi
  fi
+ if false; then
  cat << _EOF_ > /etc/ofbiz/debconf.cfg.dpkg-new
 ofbiz_readers='$ofbiz_readers'
-ofbiz_from_email='$ofbiz_from_email'
 ofbiz_admin_port='$ofbiz_admin_port'
 ofbiz_admin_key='$ofbiz_admin_key'
 _EOF_
  ucf /etc/ofbiz/debconf.cfg.dpkg-new /etc/ofbiz/debconf.cfg
  ucfr ofbiz /etc/ofbiz/debconf.cfg
  rm /etc/ofbiz/debconf.cfg.dpkg-new
+ fi
  ;;
 esac
 #DEBHELPER#

Copied: ofbiz/trunk/debian/ofbiz-framework.templates (from r689908, ofbiz/trunk/debian/ofbiz.templates)
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-framework.templates?p2=ofbiz/trunk/debian/ofbiz-framework.templates&p1=ofbiz/trunk/debian/ofbiz.templates&r1=689908&r2=718511&rev=718511&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz.templates (original)
+++ ofbiz/trunk/debian/ofbiz-framework.templates Mon Nov 17 22:58:40 2008
@@ -1,24 +1,13 @@
 Template: ofbiz/admin-password
 Type: password
 _Description: Enter the password for ofbiz admin accounts:
+ If this is the first time installing ofbiz, you can leave this
+ blank, and the default of 'ofbiz' will be choosen.
 
 Template: ofbiz/password-confirmation
 Type: password
 _Description: Password confirmation:
 
-Template: ofbiz/readers
-Default: seed
-Type: multiselect
-Choices: ${choices}
-_Description: Which additional data readers should be imported:
-
-Template: ofbiz/from-email
-Default: [hidden email]
-Type: string
-_Description: Email from address:
- Various parts of ofbiz can be configured to send email.  This specifies
- what the from address should be.
-
 Template: ofbiz/admin-password-encrypted
 Type: password
 _Description: for internal use
@@ -40,10 +29,10 @@
  This is the port used to communicate with a running ofbiz instance, to
  see if it is starting, running, or stopping.
 
-Template: ofbiz/import-additional-data
-Type: boolean
-Default: false
-_Description: Important example data?
+Template: ofbiz/readers
+Type: multiselect
+Choices: demo, ext
+_Description: Important additional data?
  OfBiz comes with lots of example data, showing products/categories/users
  etc.  If this is your first time working with ofbiz, you may want to
  import this extra data to see how to better use it.
@@ -54,3 +43,9 @@
 _Description: Reimport data?
  Whether data should be reimported on upgrade.
 
+Template: ofbiz/database-type
+Type: singleselect
+
+Template: ofbiz/_dbmethod
+Type: singleselect
+