X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/46da1409881bee5a1b11691d286f773f38374bd9..4956084c975b0ac051fff26e047579caad3fd05e:/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 fce5472cf..a10d871dc 100644 --- a/package/base-files/files/etc/hotplug.d/iface/00-netstate +++ b/package/base-files/files/etc/hotplug.d/iface/00-netstate @@ -1,6 +1,5 @@ [ ifup = "$ACTION" ] && { - uci set "/var/state/network.$INTERFACE.up=1" - [ -z "$DEVICE" ] || { - uci set "/var/state/network.$INTERFACE.ifname=$DEVICE" - } + uci_set_state network "$INTERFACE" up 1 + uci_set_state network "$INTERFACE" connect_time $(date +%s) + [ -n "$DEVICE" ] && uci_set_state network "$INTERFACE" ifname "$DEVICE" }