File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ parse_arguments()
50
50
do
51
51
case " $arg " in
52
52
--basedir=* ) basedir=` parse_arg " $arg " ` ;;
53
- --defaults-file=* ) defaults_file=` parse_arg " $arg " ` ;;
53
+ --defaults-file=* ) defaults_file=" $arg " ;;
54
54
--defaults-extra-file=* ) defaults_extra_file=" $arg " ;;
55
55
--no-defaults) no_defaults=" $arg " ;;
56
56
* )
171
171
172
172
# Now we can get arguments from the group [client] and [client-server]
173
173
# in the my.cfg file, then re-run to merge with command line arguments.
174
- parse_arguments ` $print_defaults $defaults client client-server client-mariadb`
174
+ parse_arguments ` $print_defaults $defaults_file $defaults_extra_file $no_defaults client client-server client-mariadb`
175
175
parse_arguments PICK-ARGS-FROM-ARGV " $@ "
176
176
177
177
# Configure paths to support files
@@ -232,6 +232,10 @@ basic_single_escape () {
232
232
echo " $1 " | sed ' s/\([' " '" ' \]\)/\\\1/g'
233
233
}
234
234
235
+ #
236
+ # create a simple my.cnf file to be able to pass the root password to the mysql
237
+ # client without putting it on the command line
238
+ #
235
239
make_config () {
236
240
echo " # mysql_secure_installation config file" > $config
237
241
echo " [mysql]" >> $config
@@ -242,7 +246,8 @@ make_config() {
242
246
243
247
if test -n " $defaults_file "
244
248
then
245
- cat " $defaults_file " >> $config
249
+ dfile=` parse_arg " $defaults_file " `
250
+ cat " $dfile " >> $config
246
251
fi
247
252
}
248
253
You can’t perform that action at this time.
0 commit comments