diff options
Diffstat (limited to 'package/base-files/files/etc/init.d/system')
-rwxr-xr-x | package/base-files/files/etc/init.d/system | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/package/base-files/files/etc/init.d/system b/package/base-files/files/etc/init.d/system index 531aa8cbc5..a98a972469 100755 --- a/package/base-files/files/etc/init.d/system +++ b/package/base-files/files/etc/init.d/system @@ -6,7 +6,7 @@ USE_PROCD=1 validate_system_section() { - uci_validate_section system system "${1}" \ + uci_load_validate system system "$1" "$2" \ 'hostname:string:OpenWrt' \ 'conloglevel:uinteger' \ 'buffersize:uinteger' \ @@ -15,11 +15,7 @@ validate_system_section() } system_config() { - local cfg="$1" - - local hostname conloglevel buffersize timezone zonename - - validate_system_section "${1}" || { + [ "$2" = 0 ] || { echo "validation failed" return 1 } @@ -36,7 +32,7 @@ system_config() { reload_service() { config_load system - config_foreach system_config system + config_foreach validate_system_section system system_config } service_triggers() |