In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 3:
. /usr/html/axis-cgi/lib/functions.sh
  ^-- SC1091 (info): Not following: /usr/html/axis-cgi/lib/functions.sh was not specified as input (see shellcheck -x).


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 9:
	logger -t$PRG -pcrit "$*"
                 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	logger -t"$PRG" -pcrit "$*"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 16:
	[ $# -gt 0 ] && [ "$1" ] ||
                     ^-- SC2015 (info): Note that A && B || C is not if-then-else. C may run when A is true.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 19:
	/usr/sbin/gen_serverreport.sh >$1
                                       ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	/usr/sbin/gen_serverreport.sh >"$1"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 23:
	local p mac filename fullname type
        ^-- SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 27:
	[ "$1" ] && [ -d "$1" ] || croak "Bad directory '$1' argument!"
                 ^-- SC2015 (info): Note that A && B || C is not if-then-else. C may run when A is true.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 35:
	cd $1
        ^---^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
           ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	cd "$1" || exit


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 42:
			zip -jq $fullname $* 1>&2 || croak "Failed to perform zip operation!"
                                ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                          ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems.
                                          ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
			zip -jq "$fullname" "$*" 1>&2 || croak "Failed to perform zip operation!"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 48:
			tar -cf $fullname $* || croak "Failed to perform tar operation!"
                                ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                          ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems.
                                          ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
			tar -cf "$fullname" "$*" || croak "Failed to perform tar operation!"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 57:
Expires: Thu, 01 Dec 1994 16:00:00 GMT\r\n\r\n" $fullname
                                                ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
Expires: Thu, 01 Dec 1994 16:00:00 GMT\r\n\r\n" "$fullname"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 58:
	cat $fullname
            ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	cat "$fullname"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 63:
	[ "$1" ] && [ "$2" ] && [ "$3" ] || croak "Bad arguments: blank!"
                             ^-- SC2015 (info): Note that A && B || C is not if-then-else. C may run when A is true.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 65:
	local result= f dest
        ^------------------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
                     ^-- SC1007 (warning): Remove space after = if trying to assign a value (for empty string, use var='' ... ).


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 68:
		[ -f $f ] || continue
                     ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		[ -f "$f" ] || continue


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 70:
		cp $f $dest || {
                   ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                      ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		cp "$f" "$dest" || {


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 71:
			echo "$PRG: Error copying radar diagnostic file $f!" >>$2
                                                                               ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
			echo "$PRG: Error copying radar diagnostic file $f!" >>"$2"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 78:
	eval $3=\$result
             ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	eval "$3"=\$result


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 84:
	[ "$1" ] && [ "$2" ] || croak "Bad destination file argument(s)!"
                 ^-- SC2015 (info): Note that A && B || C is not if-then-else. C may run when A is true.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 86:
	generate_report $1
                        ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	generate_report "$1"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 87:
	local dadlog=/usr/local/packages/dad/localdata/log.db
        ^----------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 90:
	eval $2=\$dadlog
             ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	eval "$2"=\$dadlog


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 94:
	[ $# -eq 1 ] && [ "$1" ] && [ -d "$1" ] ||
                                 ^-- SC2015 (info): Note that A && B || C is not if-then-else. C may run when A is true.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 98:
		cp $f $1 2>/dev/null
                   ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                      ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		cp "$f" "$1" 2>/dev/null


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 121:
		generate_files $tmpfile tmpdadlog
                               ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		generate_files "$tmpfile" tmpdadlog


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 122:
		construct_and_send_package $tmpdir "zip" $tmpfile $tmpdadlog
                                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                         ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                  ^--------^ SC2154 (warning): tmpdadlog is referenced but not assigned.
                                                                  ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		construct_and_send_package "$tmpdir" "zip" "$tmpfile" "$tmpdadlog"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 125:
		generate_files $tmpfile tmpdadlog
                               ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		generate_files "$tmpfile" tmpdadlog


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 126:
		/usr/sbin/jpeg_snapshot $tmpimage || {
                                        ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		/usr/sbin/jpeg_snapshot "$tmpimage" || {


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 127:
			echo "$PRG: Error generating snapshot image for server report." >>$tmpfile
                                                                                          ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
			echo "$PRG: Error generating snapshot image for server report." >>"$tmpfile"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 130:
		generate_radar_files $tmpdir $tmpfile radarfiles
                                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                             ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		generate_radar_files "$tmpdir" "$tmpfile" radarfiles


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 131:
		construct_and_send_package $tmpdir "zip" $tmpfile $tmpimage $tmpdadlog $radarfiles
                                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                         ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                  ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                            ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                       ^---------^ SC2154 (warning): radarfiles is referenced but not assigned.
                                                                                       ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		construct_and_send_package "$tmpdir" "zip" "$tmpfile" "$tmpimage" "$tmpdadlog" "$radarfiles"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 134:
		prepare_files $tmpdir
                              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		prepare_files "$tmpdir"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 135:
		construct_and_send_package $tmpdir "tar" "*"
                                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		construct_and_send_package "$tmpdir" "tar" "*"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 139:
		generate_report $tmpfile
                                ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		generate_report "$tmpfile"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/html/axis-cgi/serverreport.cgi line 140:
		cat $tmpfile
                    ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		cat "$tmpfile"

For more information:
  https://www.shellcheck.net/wiki/SC1007 -- Remove space after = if trying to...
  https://www.shellcheck.net/wiki/SC2048 -- Use "$@" (with quotes) to prevent...
  https://www.shellcheck.net/wiki/SC2154 -- radarfiles is referenced but not ...