Changeset 42379


Ignore:
Timestamp:
2014-09-01T15:21:54+02:00 (3 years ago)
Author:
blogic
Message:

package/*: remove useless explicit set of function returncode

somebody started to set a function returncode in the validation
stuff and everybody copies it, e.g.

myfunction()
{

fire_command

return $?

}

a function automatically returns with the last returncode,
so we can safely remove the command 'return $?'. reference:

http://tldp.org/LDP/abs/html/exit-status.html
"The last command executed in the function or script determines the exit status."

Signed-off-by: Bastian Bittorf <bittorf@…>

Backport of r42278

Location:
branches/barrier_breaker/package
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/barrier_breaker/package/base-files/files/etc/init.d/system

    r39615 r42379  
    1313                'timezone:string:UTC' \ 
    1414                'zonename:string' 
    15  
    16         return $? 
    1715} 
    1816 
  • branches/barrier_breaker/package/network/config/firewall/files/firewall.init

    r42374 r42379  
    1616                'dest_port:or(port, portrange)' \ 
    1717                'target:or("SNAT", "DNAT")' 
    18          
    19         return $? 
    2018} 
    2119 
     
    2927                'dest_port:or(port, portrange)' \ 
    3028                'target:string' 
    31          
    32         return $? 
    3329} 
    3430 
  • branches/barrier_breaker/package/network/config/netifd/files/etc/init.d/network

    r41147 r42379  
    5151                'encaps:or("llc", "vc"):llc' \ 
    5252                'payload:or("bridged", "routed"):bridged' 
    53  
    54         return $? 
    5553} 
    5654 
     
    6563                'mtu:uinteger' \ 
    6664                'table:or(range(0,65535),string)' 
    67  
    68         return $? 
    6965} 
    7066 
     
    7874                'mtu:uinteger' \ 
    7975                'table:or(range(0,65535),string)' 
    80  
    81         return $? 
    8276} 
    8377 
     
    9589                'goto:range(0,65535)' \ 
    9690                'action:or("prohibit", "unreachable", "blackhole", "throw")' 
    97  
    98         return $? 
    9991} 
    10092 
     
    112104                'goto:range(0,65535)' \ 
    113105                'action:or("prohibit", "unreachable", "blackhole", "throw")' 
    114  
    115         return $? 
    116106} 
    117107 
     
    123113                'enable_vlan:bool' \ 
    124114                'reset:bool' 
    125  
    126         return $? 
    127115} 
    128116 
     
    133121                'vlan:uinteger' \ 
    134122                'ports:list(ports)' 
    135  
    136         return $? 
    137123} 
    138124 
  • branches/barrier_breaker/package/network/services/dropbear/files/dropbear.init

    r40914 r42379  
    4848                'SSHKeepAlive:uinteger:300' \ 
    4949                'IdleTimeout:uinteger:0' 
    50         return $? 
    5150} 
    5251 
  • branches/barrier_breaker/package/network/services/relayd/files/relay.init

    r39623 r42379  
    1616                'forward_bcast:bool:1' \ 
    1717                'forward_dhcp:bool:1' 
    18  
    19         return $? 
    2018} 
    2119 
  • branches/barrier_breaker/package/system/ubox/files/log.init

    r41467 r42379  
    2020                'log_proto:or("tcp", "udp"):udp' \ 
    2121                'log_prefix:string' 
    22         return $? 
    2322} 
    2423 
     
    2827                'log_size:uinteger:0' \ 
    2928                'log_buffer_size:uinteger:0' 
    30         return $? 
    3129} 
    3230 
  • branches/barrier_breaker/package/utils/busybox/files/sysntpd

    r41415 r42379  
    1010        uci_validate_section system timeserver "${1}" \ 
    1111                'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0' 
    12         return $? 
    1312} 
    1413 
Note: See TracChangeset for help on using the changeset viewer.