]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-scripts: Avoid ShellCheck info SC2162
authorMartin Schwenke <martin@meltin.net>
Fri, 10 Jun 2022 00:28:56 +0000 (10:28 +1000)
committerAmitay Isaacs <amitay@samba.org>
Fri, 22 Jul 2022 06:38:32 +0000 (06:38 +0000)
SC2162 (info): read without -r will mangle backslashes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/events/legacy/05.system.script

index 52864aebe2f3c83f93958f6632a4a78691c76e66..87d03eff30ddf656043e6a8220bc304ec1fa6175 100755 (executable)
@@ -59,7 +59,7 @@ check_thresholds()
        if validate_percentage "$_warn_threshold" "$_thing"; then
                if [ "$_usage" -ge "$_warn_threshold" ]; then
                        if [ -r "$_cache" ]; then
-                               read _prev <"$_cache"
+                               read -r _prev <"$_cache"
                        else
                                _prev=""
                        fi
@@ -99,7 +99,7 @@ set_monitor_filsystem_usage_defaults()
                done | sort -u | xargs >"$_fs_defaults_cache"
        fi
 
-       read CTDB_MONITOR_FILESYSTEM_USAGE <"$_fs_defaults_cache"
+       read -r CTDB_MONITOR_FILESYSTEM_USAGE <"$_fs_defaults_cache"
 }
 
 monitor_filesystem_usage()