From: Michal Nowikowski Date: Thu, 24 Jan 2019 16:54:20 +0000 (+0100) Subject: hammer: added configuring for forge X-Git-Tag: 429-Updated-StampedValue-to-support-reals_base~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13a802b7e1a6aa03ff53970ae469db46a301820e;p=thirdparty%2Fkea.git hammer: added configuring for forge --- diff --git a/hammer.py b/hammer.py index d9dca99c20..4c3e372cc1 100755 --- a/hammer.py +++ b/hammer.py @@ -423,7 +423,7 @@ def _install_gtest_sources(): os.unlink('/tmp/gtest.tar.gz') -def _configure_mysql(system, revision): +def _configure_mysql(system, revision, features): if system in ['fedora', 'centos']: execute('sudo systemctl enable mariadb.service') execute('sudo systemctl start mariadb.service') @@ -443,6 +443,18 @@ def _configure_mysql(system, revision): cmd += "EOF\n\"" execute(cmd) + if 'forge' in features: + cmd = "echo 'DROP DATABASE IF EXISTS keadb;' | sudo mysql -u root" + execute(cmd) + cmd = "echo 'DROP USER 'keauser'@'localhost';' | sudo mysql -u root" + execute(cmd, raise_error=False) + cmd = "bash -c \"cat <