View | Details | Raw Unified | Return to bug 9409
Collapse All | Expand All

(-)a/debian/scripts/koha-create (-3 / +16 lines)
Lines 66-71 Options: Link Here
66
  --defaultsql some.sql     Specify a default SQL file to be loaded on the DB.
66
  --defaultsql some.sql     Specify a default SQL file to be loaded on the DB.
67
  --configfile cfg_file     Specify an alternate config file for reading default values.
67
  --configfile cfg_file     Specify an alternate config file for reading default values.
68
  --passwdfile passwd       Specify an alternate passwd file.
68
  --passwdfile passwd       Specify an alternate passwd file.
69
  --dbhost host             Enforce the use of the specified DB server
69
  --database dbname         Enforce the use of the specified DB name (64 char limit)
70
  --database dbname         Enforce the use of the specified DB name (64 char limit)
70
  --adminuser n             Explicit the admin user ID in the DB. Relevant in
71
  --adminuser n             Explicit the admin user ID in the DB. Relevant in
71
                            conjunction with --defaultsql and --populate-db.
72
                            conjunction with --defaultsql and --populate-db.
Lines 432-438 fi Link Here
432
433
433
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" )
434
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" )
434
435
435
TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser:,memcached-servers:,memcached-prefix:,upload-path:,letsencrypt, \
436
TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,dbhost:,database:,adminuser:,memcached-servers:,memcached-prefix:,upload-path:,letsencrypt, \
436
     -n "$0" -- "$@"`
437
     -n "$0" -- "$@"`
437
438
438
# Note the quotes around `$TEMP': they are essential!
439
# Note the quotes around `$TEMP': they are essential!
Lines 482-487 while true ; do Link Here
482
            CLO_PASSWDFILE="$2" ; shift 2 ;;
483
            CLO_PASSWDFILE="$2" ; shift 2 ;;
483
        -b|--database)
484
        -b|--database)
484
            CLO_DATABASE="$2" ; shift 2 ;;
485
            CLO_DATABASE="$2" ; shift 2 ;;
486
        --dbhost)
487
            CLO_DBHOST="$2" ; shift 2 ;;
485
        -a|--adminuser)
488
        -a|--adminuser)
486
            CLO_ADMINUSER="$2" ; shift 2 ;;
489
            CLO_ADMINUSER="$2" ; shift 2 ;;
487
        --enable-sru)
490
        --enable-sru)
Lines 600-605 then Link Here
600
    mysqluser=`echo $passwdline | cut -d ":" -f 2`
603
    mysqluser=`echo $passwdline | cut -d ":" -f 2`
601
    mysqlpwd=`echo $passwdline | cut -d ":" -f 3`
604
    mysqlpwd=`echo $passwdline | cut -d ":" -f 3`
602
    mysqldb=`echo $passwdline | cut -d ":" -f 4`
605
    mysqldb=`echo $passwdline | cut -d ":" -f 4`
606
    mysqlhost=`echo $passwdline | cut -d ":" -f 5`
603
fi
607
fi
604
608
605
# The order of precedence for MySQL database name is:
609
# The order of precedence for MySQL database name is:
Lines 608-613 if [ "$mysqldb" = "" ] Link Here
608
then
612
then
609
    mysqldb="koha_$name"
613
    mysqldb="koha_$name"
610
fi
614
fi
615
611
if [ "$CLO_DATABASE" != "" ]
616
if [ "$CLO_DATABASE" != "" ]
612
then
617
then
613
    mysqldb="$CLO_DATABASE"
618
    mysqldb="$CLO_DATABASE"
Lines 617-623 if [ "$mysqluser" = "" ] Link Here
617
then
622
then
618
    mysqluser="koha_$name"
623
    mysqluser="koha_$name"
619
fi
624
fi
620
mysqlhost="$(getmysqlhost)"
625
626
if [ "$CLO_DBHOST" != "" ]
627
then
628
    mysqlhost="$CLO_DBHOST"
629
fi
630
631
if [ "$mysqlhost" = "" ]
632
then
633
    mysqlhost="$(getmysqlhost)"
634
fi
621
635
622
if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ]
636
if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ]
623
then
637
then
624
- 

Return to bug 9409