summaryrefslogtreecommitdiffstats
path: root/src/bin/admin
diff options
context:
space:
mode:
authorAndrei Pavel <andrei@isc.org>2024-02-20 19:49:37 +0100
committerAndrei Pavel <andrei@isc.org>2024-02-22 09:06:32 +0100
commitaf063a3c02fbab8ff9b54c9f641d2a310e141bee (patch)
tree349a7d71d05cce26a207dbdcb4b9fe3fa62b6151 /src/bin/admin
parent[#3025] simplify logic in ensureSchemaVersion (diff)
downloadkea-af063a3c02fbab8ff9b54c9f641d2a310e141bee.tar.xz
kea-af063a3c02fbab8ff9b54c9f641d2a310e141bee.zip
[#3025] appease shellcheck
. "${admin_utils}" ^--------------^ SC1090: Can't follow non-constant source. Use a directive to specify location. version=$(checked_mysql_version) ^-------------------^ SC2119: Use checked_mysql_version "$@" if function's $1 should mean script's $1. ... and others that spiraled afterwards
Diffstat (limited to 'src/bin/admin')
-rw-r--r--src/bin/admin/kea-admin.in7
-rw-r--r--src/bin/admin/tests/admin_tests.sh.in5
-rw-r--r--src/bin/admin/tests/memfile_tests.sh.in7
-rw-r--r--src/bin/admin/tests/mysql_tests.sh.in5
-rw-r--r--src/bin/admin/tests/pgsql_tests.sh.in5
5 files changed, 8 insertions, 21 deletions
diff --git a/src/bin/admin/kea-admin.in b/src/bin/admin/kea-admin.in
index 4d62192cce..3e90acd98c 100644
--- a/src/bin/admin/kea-admin.in
+++ b/src/bin/admin/kea-admin.in
@@ -16,12 +16,6 @@
# - lease upload to the database
# - lease database recount
-# shellcheck disable=SC1091
-# SC1091: Not following: ... was not specified as input (see shellcheck -x).
-
-# shellcheck disable=SC2039
-# SC2039: In POSIX sh, 'local' is undefined.
-
# shellcheck disable=SC2086
# SC2086: Double quote to prevent globbing and word splitting.
# Reason for disable: explicitly don't quote extra_arguments so it is
@@ -61,6 +55,7 @@ else
SCRIPTS_DIR="@datarootdir@/@PACKAGE@/scripts"
fi
+# shellcheck source=src/bin/admin/admin-utils.sh.in
. "${admin_utils}"
# Prints out usage version.
diff --git a/src/bin/admin/tests/admin_tests.sh.in b/src/bin/admin/tests/admin_tests.sh.in
index c6b8a26c93..0fd3084d3e 100644
--- a/src/bin/admin/tests/admin_tests.sh.in
+++ b/src/bin/admin/tests/admin_tests.sh.in
@@ -6,17 +6,16 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-# shellcheck disable=SC1091
-# SC1091: Not following: ... was not specified as input (see shellcheck -x).
-
# Exit with error if commands exit with non-zero and if undefined variables are
# used.
set -eu
# Include common test library.
+# shellcheck source=src/lib/testutils/dhcp_test_lib.sh.in
. "@abs_top_builddir@/src/lib/testutils/dhcp_test_lib.sh"
# Include admin utilities
+# shellcheck source=src/bin/admin/admin-utils.sh.in
. "@abs_top_builddir@/src/bin/admin/admin-utils.sh"
# Set location of the kea-admin.
diff --git a/src/bin/admin/tests/memfile_tests.sh.in b/src/bin/admin/tests/memfile_tests.sh.in
index ad10109d5f..b83d3d5688 100644
--- a/src/bin/admin/tests/memfile_tests.sh.in
+++ b/src/bin/admin/tests/memfile_tests.sh.in
@@ -6,17 +6,12 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-# shellcheck disable=SC1091
-# SC1091: Not following: ... was not specified as input (see shellcheck -x).
-
-# shellcheck disable=SC2039
-# SC2039: In POSIX sh, 'local' is undefined.
-
# Exit with error if commands exit with non-zero and if undefined variables are
# used.
set -eu
# Include common test library.
+# shellcheck source=src/lib/testutils/dhcp_test_lib.sh.in
. "@abs_top_builddir@/src/lib/testutils/dhcp_test_lib.sh"
# Locations of memfile tools
diff --git a/src/bin/admin/tests/mysql_tests.sh.in b/src/bin/admin/tests/mysql_tests.sh.in
index 86d6382070..93f6dbb4de 100644
--- a/src/bin/admin/tests/mysql_tests.sh.in
+++ b/src/bin/admin/tests/mysql_tests.sh.in
@@ -6,9 +6,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-# shellcheck disable=SC1091
-# SC1091: Not following: ... was not specified as input (see shellcheck -x).
-
# shellcheck disable=SC2154
# SC2154: ... is referenced but not assigned.
# Reason: some variables are sourced.
@@ -18,9 +15,11 @@
set -eu
# Include common test library.
+# shellcheck source=src/lib/testutils/dhcp_test_lib.sh.in
. "@abs_top_builddir@/src/lib/testutils/dhcp_test_lib.sh"
# Include admin utilities
+# shellcheck source=src/bin/admin/admin-utils.sh.in
. "@abs_top_builddir@/src/bin/admin/admin-utils.sh"
# Set path to the production schema scripts
diff --git a/src/bin/admin/tests/pgsql_tests.sh.in b/src/bin/admin/tests/pgsql_tests.sh.in
index eda3c6c2e3..2f9404a774 100644
--- a/src/bin/admin/tests/pgsql_tests.sh.in
+++ b/src/bin/admin/tests/pgsql_tests.sh.in
@@ -6,9 +6,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-# shellcheck disable=SC1091
-# SC1091: Not following: ... was not specified as input (see shellcheck -x).
-
# shellcheck disable=SC2154
# SC2154: ... is referenced but not assigned.
# Reason: some variables are sourced.
@@ -18,9 +15,11 @@
set -eu
# Include common test library.
+# shellcheck source=src/lib/testutils/dhcp_test_lib.sh.in
. "@abs_top_builddir@/src/lib/testutils/dhcp_test_lib.sh"
# Include admin utilities
+# shellcheck source=src/bin/admin/admin-utils.sh.in
. "@abs_top_builddir@/src/bin/admin/admin-utils.sh"
# Set path to the production schema scripts