From: Martin Schwenke Date: Mon, 3 Jul 2023 03:34:58 +0000 (+1000) Subject: ctdb-scripts: Avoid ShellCheck warnings SC2317, SC2086 X-Git-Tag: talloc-2.4.1~97 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=37105addecc804ecd1c187c19adf40e97472d6e1;p=thirdparty%2Fsamba.git ctdb-scripts: Avoid ShellCheck warnings SC2317, SC2086 New in ShellCheck 0.9.0: SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). Also: SC2086 (info): Double quote to prevent globbing and word splitting. Signed-off-by: Martin Schwenke Reviewed-by: Andreas Schneider --- diff --git a/ctdb/config/events/legacy/05.system.script b/ctdb/config/events/legacy/05.system.script index 56a07c7cc77..bf36dd21ffa 100755 --- a/ctdb/config/events/legacy/05.system.script +++ b/ctdb/config/events/legacy/05.system.script @@ -139,6 +139,8 @@ monitor_filesystem_usage() done } +# shellcheck disable=SC2317 +# Called indirectly via check_thresholds() dump_memory_info() { get_proc "meminfo" diff --git a/ctdb/config/events/legacy/40.vsftpd.script b/ctdb/config/events/legacy/40.vsftpd.script index 19d40071ce2..1202812c3cd 100755 --- a/ctdb/config/events/legacy/40.vsftpd.script +++ b/ctdb/config/events/legacy/40.vsftpd.script @@ -10,7 +10,9 @@ service_name="vsftpd" service_reconfigure () { - service $service_name restart + # shellcheck disable=SC2317 + # Called indirectly via ctdb_service_reconfigure() + service "$service_name" restart } load_script_options diff --git a/ctdb/config/events/legacy/60.nfs.script b/ctdb/config/events/legacy/60.nfs.script index 8e496f73cc5..b7ae0746be5 100755 --- a/ctdb/config/events/legacy/60.nfs.script +++ b/ctdb/config/events/legacy/60.nfs.script @@ -19,6 +19,8 @@ ctdb_setup_state_dir "service" "$service_name" service_reconfigure () { # Restart lock manager, notify clients + # shellcheck disable=SC2317 + # Called indirectly via check_thresholds() if [ -x "${CTDB_BASE}/statd-callout" ] ; then "${CTDB_BASE}/statd-callout" notify & fi >/dev/null 2>&1