[sr-dev] git:master: kamdbctl: option to run without asking mysql root password if empty
Daniel-Constantin Mierla
miconda at gmail.com
Wed Oct 1 14:52:22 CEST 2014
Module: sip-router
Branch: master
Commit: 765532005914b9f457596aaac715cf2a0b863078
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=765532005914b9f457596aaac715cf2a0b863078
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: Wed Oct 1 14:44:40 2014 +0200
kamdbctl: option to run without asking mysql root password if empty
- provide PWSKIP=yes - good for automate testing
---
utils/kamctl/kamdbctl.mysql | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/utils/kamctl/kamdbctl.mysql b/utils/kamctl/kamdbctl.mysql
index 0c6d5d3..dea0d95 100644
--- a/utils/kamctl/kamdbctl.mysql
+++ b/utils/kamctl/kamdbctl.mysql
@@ -130,9 +130,10 @@ kamailio_db_create () # pars: <database name>
exit 1
fi
- minfo "test server charset"
-
- db_charset_test
+ if [ "$CHARSET" = "" ]; then
+ minfo "test server charset"
+ db_charset_test
+ fi
minfo "creating database $1 ..."
@@ -536,5 +537,7 @@ fi
export PW
if [ "$#" -ne 0 ] && [ "$PW" = "" ]; then
- prompt_pw
+ if [ "$PWSKIP" = "" ]; then
+ prompt_pw
+ fi
fi
More information about the sr-dev
mailing list