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

(-)a/debian/scripts/koha-create (-5 / +11 lines)
Lines 23-29 usage="Usage: $0 [--create-db|--request-db|--populate-db] \ Link Here
23
    [--marcflavor marc21|normarc|unimarc] \
23
    [--marcflavor marc21|normarc|unimarc] \
24
    [--zebralang en|nb|fr] \
24
    [--zebralang en|nb|fr] \
25
    [--defaultsql /path/to/some.sql] \
25
    [--defaultsql /path/to/some.sql] \
26
    [--configfile /path/to/config] instancename"
26
    [--configfile /path/to/config] [--adminuser n] instancename"
27
27
28
die() {
28
die() {
29
    echo "$@" 1>&2
29
    echo "$@" 1>&2
Lines 79-92 INTRASUFFIX="" Link Here
79
DEFAULTSQL=""
79
DEFAULTSQL=""
80
ZEBRA_MARC_FORMAT="marc21"
80
ZEBRA_MARC_FORMAT="marc21"
81
ZEBRA_LANGUAGE="en"
81
ZEBRA_LANGUAGE="en"
82
ADMINUSER="1"
82
if [ -e /etc/koha/koha-sites.conf ]
83
if [ -e /etc/koha/koha-sites.conf ]
83
then
84
then
84
    . /etc/koha/koha-sites.conf
85
    . /etc/koha/koha-sites.conf
85
fi
86
fi
86
87
87
[ $# -ge 2 ] && [ $# -le 10 ] || die $usage
88
[ $# -ge 2 ] && [ $# -le 12 ] || die $usage
88
89
89
TEMP=`getopt -o crpm:l:d:f: -l create-db,request-db,populate-db,marcflavor:,zebralang:,defaultsql:,configfile: \
90
TEMP=`getopt -o crpm:l:d:f:a: -l create-db,request-db,populate-db,marcflavor:,zebralang:,defaultsql:,configfile:,adminuser: \
90
     -n "$0" -- "$@"`
91
     -n "$0" -- "$@"`
91
92
92
# Note the quotes around `$TEMP': they are essential!
93
# Note the quotes around `$TEMP': they are essential!
Lines 96-101 eval set -- "$TEMP" Link Here
96
CLO_ZEBRA_MARC_FORMAT=""
97
CLO_ZEBRA_MARC_FORMAT=""
97
CLO_ZEBRA_LANGUAGE=""
98
CLO_ZEBRA_LANGUAGE=""
98
CLO_DEFAULTSQL=""
99
CLO_DEFAULTSQL=""
100
CLO_ADMINUSER=""
99
101
100
while true ; do
102
while true ; do
101
	case "$1" in
103
	case "$1" in
Lines 106-111 while true ; do Link Here
106
		-l|--zebralang) CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;;
108
		-l|--zebralang) CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;;
107
		-d|--defaultsql) CLO_DEFAULTSQL="$2" ; shift 2 ;;
109
		-d|--defaultsql) CLO_DEFAULTSQL="$2" ; shift 2 ;;
108
		-f|--configfile) configfile="$2" ; shift 2 ;;
110
		-f|--configfile) configfile="$2" ; shift 2 ;;
111
		-a|--adminuser) CLO_ADMINUSER="$2" ; shift 2 ;;
109
		--) shift ; break ;;
112
		--) shift ; break ;;
110
		*) die "Internal error processing command line arguments" ;;
113
		*) die "Internal error processing command line arguments" ;;
111
	esac
114
	esac
Lines 135-140 if [ "$CLO_DEFAULTSQL" != "" ] Link Here
135
then
138
then
136
    DEFAULTSQL="$CLO_DEFAULTSQL"
139
    DEFAULTSQL="$CLO_DEFAULTSQL"
137
fi
140
fi
141
if [ "$CLO_ADMINUSER" != "" ]
142
then
143
    ADMINUSER="$CLO_ADMINUSER"
144
fi
138
145
139
name="$1"
146
name="$1"
140
147
Lines 264-270 then Link Here
264
USE \`$mysqldb\`;
271
USE \`$mysqldb\`;
265
UPDATE borrowers 
272
UPDATE borrowers 
266
SET password = '$staffdigest' 
273
SET password = '$staffdigest' 
267
WHERE borrowernumber = 3;
274
WHERE borrowernumber = $ADMINUSER;
268
eof
275
eof
269
        #`
276
        #`
270
        echo "staff user password is '$staffpass' but keep that secret"
277
        echo "staff user password is '$staffpass' but keep that secret"
271
- 

Return to bug 6516