X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/afa5da1d1bf575000d260e9abe26d47b94e3e117..c151dac4be54c60ea06951e6febd926a31bafd02:/package/base-files/files/etc/hotplug.d/iface/00-netstate diff --git a/package/base-files/files/etc/hotplug.d/iface/00-netstate b/package/base-files/files/etc/hotplug.d/iface/00-netstate index f215d29b5..e2e58456b 100644 --- a/package/base-files/files/etc/hotplug.d/iface/00-netstate +++ b/package/base-files/files/etc/hotplug.d/iface/00-netstate @@ -1,3 +1,5 @@ [ ifup = "$ACTION" ] && { uci_set_state network "$INTERFACE" up 1 + uci_set_state network "$INTERFACE" connect_time $(sed -ne 's![^0-9].*$!!p' /proc/uptime) + [ -n "$DEVICE" ] && uci_set_state network "$INTERFACE" ifname "$DEVICE" }