]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/updatedb/update_mysql_tables_9_to_10.in
Fix race condition between setip and the access to CLIENT::address()
[bacula/bacula] / bacula / updatedb / update_mysql_tables_9_to_10.in
index ce2fd2a62e8827e67205b47fb4fac53653fc3567..4e0eec4561962c343982306df41844beaf05a68d 100644 (file)
@@ -1,5 +1,8 @@
 #!/bin/sh
 #
+# Copyright (C) 2000-2015 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
 # Shell script to update MySQL tables from version 1.38 to 2.0 
 #
 echo " "
@@ -8,10 +11,11 @@ echo " which is needed to convert from Bacula version 1.38.x to 2.0.x or higher"
 echo "Depending on the size of your database,"
 echo "this script may take several minutes to run."
 echo " "
-bindir=@SQL_BINDIR@
-db_name=@db_name@
+bindir=@MYSQL_BINDIR@
+PATH="$bindir:$PATH"
+db_name=${db_name:-@db_name@}
 
-if $bindir/mysql $* -f <<END-OF-DATA
+if mysql $* -f <<END-OF-DATA
 USE ${db_name};
 
 DROP TABLE IF EXISTS MAC;