mirror of
https://github.com/openwrt/packages.git
synced 2025-12-10 12:41:22 +00:00
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>
This commit is contained in:
@@ -38,8 +38,8 @@ config_watchcat() {
|
|||||||
config_get pingperiod "$1" pingperiod "60"
|
config_get pingperiod "$1" pingperiod "60"
|
||||||
config_get forcedelay "$1" forcedelay "60"
|
config_get forcedelay "$1" forcedelay "60"
|
||||||
config_get pingsize "$1" pingsize "standard"
|
config_get pingsize "$1" pingsize "standard"
|
||||||
config_get interface "$1" interface # CHEK only if need a default?
|
config_get interface "$1" interface
|
||||||
config_get mmifacename "$1" mmifacename # FIX HERE need a default?
|
config_get mmifacename "$1" mmifacename "null"
|
||||||
config_get_bool unlockbands "$1" unlockbands "0"
|
config_get_bool unlockbands "$1" unlockbands "0"
|
||||||
config_get addressfamily "$1" addressfamily "any"
|
config_get addressfamily "$1" addressfamily "any"
|
||||||
config_get script "$1" script
|
config_get script "$1" script
|
||||||
@@ -73,7 +73,7 @@ config_watchcat() {
|
|||||||
append_string "warn" "pingperiod cannot be a negative value." "; "
|
append_string "warn" "pingperiod cannot be a negative value." "; "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$mmifacename" != "" ] && [ "$period" -lt 30 ]; then
|
if [ "$mmifacename" != "null" ] && [ "$period" -lt 30 ]; then
|
||||||
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."
|
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."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user