]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#828] Fixed shellcheck
authorFrancis Dupont <fdupont@isc.org>
Wed, 9 Sep 2020 13:39:04 +0000 (15:39 +0200)
committerFrancis Dupont <fdupont@isc.org>
Thu, 10 Sep 2020 10:41:35 +0000 (12:41 +0200)
src/bin/admin/admin-utils.sh

index a698640b22b95107adfbb9e85b1f8230a25c23fb..0041caa1ec33ced0b7ef2ae94596490d7fa167ae 100644 (file)
@@ -53,13 +53,14 @@ mysql_version() {
 }
 
 checked_mysql_version() {
-    mysql_version
+    mysql_execute "SELECT CONCAT_WS('.', version, minor) FROM schema_version" "$@"
     retcode=$?
     if [ $retcode -ne 0 ]
     then
         printf "Failed to get schema version, mysql status  %s\n" "${retcode}"
         exit 1
     fi
+    return $retcode
 }
 
 # Submits given SQL text to PostgreSQL
@@ -116,13 +117,14 @@ pgsql_version() {
 }
 
 checked_pgsql_version() {
-    pgsql_version
+    pgsql_execute "SELECT version || '.' || minor FROM schema_version" "$@"
     retcode=$?
     if [ $retcode -ne 0 ]
     then
         printf "Failed to get schema version, pgsql status %s\n" "${retcode}"
         exit 1
     fi
+    return $retcode
 }
 
 cql_execute() {