In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 33:
INTERFACE=`cat $INTERFACE_FILE`
^-------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
Did you mean:
INTERFACE=$(cat $INTERFACE_FILE)
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 34:
LANIP=`ifconfig $INTERFACE | grep 'inet addr' | cut -d: -f2 | awk '{print $1}'`
^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
LANIP=$(ifconfig "$INTERFACE" | grep 'inet addr' | cut -d: -f2 | awk '{print $1}')
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 44:
echo "[`date +"%Y-%m-%d %H:%M:%S"`] $1" > /dev/null 2>&
^-------------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
Did you mean:
echo "[$(date +"%Y-%m-%d %H:%M:%S")] $1" > /dev/null 2>&1
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 60:
wd_pid=`cat ${WATCHDOG_PID}`
^-------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
Did you mean:
wd_pid=$(cat ${WATCHDOG_PID})
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 72:
`cp /mydlink/config/device.mmt /mydlink/config/device.cfg`
^-- SC2092 (warning): Remove backticks to avoid executing output (or use eval if intentional).
^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
Did you mean:
$(cp /mydlink/config/device.mmt /mydlink/config/device.cfg)
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 74:
`cp /mydlink/device.cfg /mydlink/config/device.cfg`
^-- SC2092 (warning): Remove backticks to avoid executing output (or use eval if intentional).
^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
Did you mean:
$(cp /mydlink/device.cfg /mydlink/config/device.cfg)
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 80:
db_dev_list=`LD_LIBRARY_PATH="/mydlink/lib" $mdb_path get dev_list`
^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
Did you mean:
mdb_dev_list=$(LD_LIBRARY_PATH="/mydlink/lib" $mdb_path get dev_list)
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 81:
DEV_LIST_DECODED=$(echo -e "$mdb_dev_list" | sed 's/+/ /g;s/%/\\\\x/g;' | sed 's/+/ /g;s/&/\n/g' |awk -F'=' '{if($1=="C") print $2}' | grep 32 -c)
^-- SC3037 (warning): In POSIX sh, echo flags are undefined.
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 83:
db_dev_model=`LD_LIBRARY_PATH="/mydlink/lib" $mdb_path get dev_model`
^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
Did you mean:
mdb_dev_model=$(LD_LIBRARY_PATH="/mydlink/lib" $mdb_path get dev_model)
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 111:
if [ -z $1 ];then
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
if [ -z "$1" ];then
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 116:
Free_Memory=`cat /proc/meminfo | grep 'MemFree:' | sed 's/^.*MemFree://g' | sed 's/kB*$//g'`
^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
^-----------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
Did you mean:
Free_Memory=$(cat /proc/meminfo | grep 'MemFree:' | sed 's/^.*MemFree://g' | sed 's/kB*$//g')
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 118:
if [ $Free_Memory -le $Memory_Threshold ]; then
^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
if [ "$Free_Memory" -le $Memory_Threshold ]; then
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 126:
if [ ! -f "$MYDLINK_BASE/$1" ] && [ ! -z $1 ]; then
^-- SC2236 (style): Use -n instead of ! -z.
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
if [ ! -f "$MYDLINK_BASE/$1" ] && [ ! -z "$1" ]; then
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 132:
pid=`cat ${PID_BASE}/${1}.pid`
^------------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
pid=$(cat ${PID_BASE}/"${1}".pid)
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 135:
MEM_PAGES=`cat /proc/${pid}/statm | awk '{print $1}'`
^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
MEM_PAGES=$(cat /proc/"${pid}"/statm | awk '{print $1}')
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 136:
allocated_memory=`expr $MEM_PAGES \* $FW_PAGE_SIZE`
^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
^--^ SC2003 (style): expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].
^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
allocated_memory=$(expr "$MEM_PAGES" \* "$FW_PAGE_SIZE")
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 137:
if [ $allocated_memory -gt $2 ]; then
^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
if [ "$allocated_memory" -gt "$2" ]; then
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 138:
killall -9 $1
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
killall -9 "$1"
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 154:
pid=`cat ${PID_BASE}/${1}.pid`
^------------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
pid=$(cat ${PID_BASE}/"${1}".pid)
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 157:
state=`cat /proc/${pid}/stat | awk '{print $3}'`
^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
state=$(cat /proc/"${pid}"/stat | awk '{print $3}')
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 164:
restart_cnt=`expr $restart_cnt + 1`
^---------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
^--^ SC2003 (style): expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].
^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
restart_cnt=$(expr "$restart_cnt" + 1)
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 172:
killall -9 $1 2>/dev/null
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
killall -9 "$1" 2>/dev/null
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 179:
LD_LIBRARY_PATH="/mydlink/lib" /mydlink/$1 "$2" "$3" > /dev/null 2>&1 &
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
LD_LIBRARY_PATH="/mydlink/lib" /mydlink/"$1" "$2" "$3" > /dev/null 2>&1 &
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 181:
LD_LIBRARY_PATH="/mydlink/lib" /mydlink/$1 "$2" > /dev/null 2>&1 &
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
LD_LIBRARY_PATH="/mydlink/lib" /mydlink/"$1" "$2" > /dev/null 2>&1 &
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 194:
ca_check_counter=`expr $ca_check_counter + 1`
^--------------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
^--^ SC2003 (style): expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].
^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
ca_check_counter=$(expr "$ca_check_counter" + 1)
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 197:
ca_next_check_time=`cat $CA_CHECK_FLAG`
^------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
Did you mean:
ca_next_check_time=$(cat $CA_CHECK_FLAG)
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 202:
if [ $ca_check_counter -lt $ca_next_check_time ]; then
^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
^-----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
if [ "$ca_check_counter" -lt "$ca_next_check_time" ]; then
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 218:
echo -n $ca_next_check_time > $CA_CHECK_FLAG
^-- SC3037 (warning): In POSIX sh, echo flags are undefined.
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 225:
while [ 1 ]
^-- SC2161 (style): Instead of '[ 1 ]', use 'true'.
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 242:
pid=`cat ${PID_BASE}/${1}.pid`
^------------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
pid=$(cat ${PID_BASE}/"${1}".pid)
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 243:
rm $PID_BASE/${1}.pid
^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
rm $PID_BASE/"${1}".pid
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 247:
killall -9 $1 2>/dev/null
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
killall -9 "$1" 2>/dev/null
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 252:
pid=`pidof $1`
^--------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
pid=$(pidof "$1")
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 254:
killall -9 $1 2>/dev/null
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
killall -9 "$1" 2>/dev/null
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 259:
if [ "$1" == "restart" ]; then
^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 266:
db_oob_st=`LD_LIBRARY_PATH="/mydlink/lib" $mdb_path get oob_changed`
^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
Did you mean:
mdb_oob_st=$(LD_LIBRARY_PATH="/mydlink/lib" $mdb_path get oob_changed)
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 267:
if [ "$mdb_oob_st" == "1" ] && [ -f $SYNC_OOB_FILE ]; then
^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 273:
while [ 1 ]
^-- SC2161 (style): Instead of '[ 1 ]', use 'true'.
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 275:
curpid=`cat ${WATCHDOG_PID}`
^-------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
Did you mean:
curpid=$(cat ${WATCHDOG_PID})
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 291:
mdb_reg_st=`LD_LIBRARY_PATH="/mydlink/lib" $mdb_path get register_st`
^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
Did you mean:
mdb_reg_st=$(LD_LIBRARY_PATH="/mydlink/lib" $mdb_path get register_st)
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 292:
if [ "$mdb_reg_st" == "1" ] && [ "$mdb_oob_st" != "1" ]; then
^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.
In /logs/firmware/patool_extraction/DUMP/mtdblock2_unblob_extracted/mtdblock2_extract/0-376832.squashfs_v4_le_extract/mydlink_watchdog.sh line 299:
if [ "$mdb_reg_st" == "1" ] && [ "$mdb_oob_st" != "1" ]; then
^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.
For more information:
https://www.shellcheck.net/wiki/SC2092 -- Remove backticks to avoid executi...
https://www.shellcheck.net/wiki/SC3014 -- In POSIX sh, == in place of = is ...
https://www.shellcheck.net/wiki/SC3037 -- In POSIX sh, echo flags are undef...