Skip to content

Commit f54e7c5

Browse files
committed
[kea-packaging#8] hammer: stop mariadb before setup
Attempt to fix `start-stop-daemon: /usr/bin/mysqld_safe is already running`
1 parent 0633f93 commit f54e7c5

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

hammer.py

+3-11
Original file line numberDiff line numberDiff line change
@@ -1370,17 +1370,9 @@ def _configure_mysql(system, revision, features):
13701370
elif system == 'alpine':
13711371
execute('sudo sed -i "/^skip-networking$/d" /etc/my.cnf.d/mariadb-server.cnf')
13721372
execute('sudo rc-update add mariadb')
1373-
execute('sudo /etc/init.d/mariadb setup', raise_error=False)
1374-
1375-
# Wait for setup command to complete.
1376-
for i in range(10):
1377-
exit_code = execute('sudo pidof mysqld_safe', raise_error=False)
1378-
if exit_code != 0:
1379-
# Process exited or there was no process to begin with.
1380-
break
1381-
time.sleep(1)
1382-
1383-
execute('sudo /etc/init.d/mariadb restart')
1373+
execute('sudo rc-service mariadb stop')
1374+
execute('sudo rc-service mariadb setup')
1375+
execute('sudo rc-service mariadb restart')
13841376

13851377
cmd = "echo 'DROP DATABASE IF EXISTS keatest;' | sudo mysql -u root"
13861378
execute(cmd)

0 commit comments

Comments
 (0)