You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
watchcat: set default value for mmifacename to prevent argument shift
Set mmifacename default to "null" instead of an empty string to avoid
argument displacement when the value is not defined. Also remove leftover
debug comments from previous commit.
Signed-off-by: Ivan Diaz <diaz.it@icloud.com>
Copy file name to clipboardExpand all lines: utils/watchcat/files/watchcat.init
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -38,8 +38,8 @@ config_watchcat() {
38
38
config_get pingperiod "$1" pingperiod "60"
39
39
config_get forcedelay "$1" forcedelay "60"
40
40
config_get pingsize "$1" pingsize "standard"
41
-
config_get interface "$1" interface# CHEK only if need a default?
42
-
config_get mmifacename "$1" mmifacename # FIX HERE need a default?
41
+
config_get interface "$1" interface
42
+
config_get mmifacename "$1" mmifacename "null"
43
43
config_get_bool unlockbands "$1" unlockbands "0"
44
44
config_get addressfamily "$1" addressfamily "any"
45
45
config_get script "$1" script
@@ -73,7 +73,7 @@ config_watchcat() {
73
73
append_string "warn""pingperiod cannot be a negative value.""; "
74
74
fi
75
75
76
-
if [ "$mmifacename"!="" ] && [ "$period"-lt 30 ];then
76
+
if [ "$mmifacename"!="null" ] && [ "$period"-lt 30 ];then
77
77
append_string "error""Check interval is less than 30s. For robust operation with ModemManager modem interfaces it is recommended to set the period to at least 30s."
0 commit comments