OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 4... Line 4...
4 START=10 4 START=10
5 USE_PROCD=1 5 USE_PROCD=1
Line 6... Line 6...
6   6  
7 validate_system_section() 7 validate_system_section()
8 { 8 {
9 uci_load_validate system system "$1" "$2" \ 9 uci_validate_section system system "${1}" \
10 'hostname:string:OpenWrt' \ 10 'hostname:string:OpenWrt' \
11 'conloglevel:uinteger' \ 11 'conloglevel:uinteger' \
12 'buffersize:uinteger' \ 12 'buffersize:uinteger' \
13 'timezone:string:UTC' \ 13 'timezone:string:UTC' \
14 'zonename:string' 14 'zonename:string'
Line 15... Line 15...
15 } 15 }
16   16  
-   17 system_config() {
-   18 local cfg="$1"
-   19  
-   20 local hostname conloglevel buffersize timezone zonename
17 system_config() { 21  
18 [ "$2" = 0 ] || { 22 validate_system_section "${1}" || {
19 echo "validation failed" 23 echo "validation failed"
Line 20... Line 24...
20 return 1 24 return 1
Line 30... Line 34...
30 date -k 34 date -k
31 } 35 }
Line 32... Line 36...
32   36  
33 reload_service() { 37 reload_service() {
34 config_load system 38 config_load system
35 config_foreach validate_system_section system system_config 39 config_foreach system_config system
Line 36... Line 40...
36 } 40 }
37   41  
38 service_triggers() 42 service_triggers()