validate_section_dropbear()
{
- uci_validate_section dropbear dropbear "${1}" \
+ uci_load_validate dropbear dropbear "$1" "$2" \
'PasswordAuth:bool:1' \
'enable:bool:1' \
'Interface:string' \
dropbear_instance()
{
- local PasswordAuth enable Interface GatewayPorts \
- RootPasswordAuth RootLogin rsakeyfile \
- BannerFile Port SSHKeepAlive IdleTimeout \
- MaxAuthTries RecvWindowSize mdns ipaddrs
+ local ipaddrs
- validate_section_dropbear "${1}" || {
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
. /lib/functions/network.sh
config_load "${NAME}"
- config_foreach dropbear_instance dropbear
+ config_foreach validate_section_dropbear dropbear dropbear_instance
}
service_triggers()