Changeset 40385


Ignore:
Timestamp:
2014-04-05T20:17:22+02:00 (4 years ago)
Author:
nbd
Message:

netifd: Add renew handler for proto dhcp

Signed-off-by: Helmut Schaa <helmut.schaa@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh

    r40332 r40385  
    66 
    77proto_dhcp_init_config() { 
     8        renew_handler=1 
     9 
    810        proto_config_add_string 'ipaddr:ipaddr' 
    911        proto_config_add_string 'hostname:hostname' 
     
    5254} 
    5355 
     56proto_dhcp_renew() { 
     57        local interface="$1" 
     58        # SIGUSR1 forces udhcpc to renew its lease 
     59        local sigusr1="$(kill -l SIGUSR1)" 
     60        [ -n "$sigusr1" ] && proto_kill_command "$interface" $sigusr1 
     61} 
     62 
    5463proto_dhcp_teardown() { 
    5564        local interface="$1" 
Note: See TracChangeset for help on using the changeset viewer.