Changeset 24212


Ignore:
Timestamp:
2010-12-01T20:55:24+01:00 (7 years ago)
Author:
jow
Message:

[package] base-files: derive connect_time from uptime as local system time may warp due to rdate, ntp and other means

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/files/etc/hotplug.d/iface/00-netstate

    r24206 r24212  
    11[ ifup = "$ACTION" ] && { 
    22        uci_set_state network "$INTERFACE" up 1  
    3         uci_set_state network "$INTERFACE" connect_time $(date +%s) 
     3        uci_set_state network "$INTERFACE" connect_time $(sed -ne 's![^0-9].*$!!p' /proc/uptime) 
    44        [ -n "$DEVICE" ] && uci_set_state network "$INTERFACE" ifname "$DEVICE" 
    55} 
Note: See TracChangeset for help on using the changeset viewer.