mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 16:10:39 +02:00
[package] base-files: implement network_defer_device() and network_ready_device() wrappers for upcoming netifd iface deferring support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32106 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
67b7bdf7e7
commit
ab865f7094
@ -62,3 +62,19 @@ network_is_up()
|
||||
|
||||
network_get_device() { __network_device "$1" "$2" l3_device; }
|
||||
network_get_physdev() { __network_device "$1" "$2" device; }
|
||||
|
||||
|
||||
__network_defer()
|
||||
{
|
||||
local __device="$1"
|
||||
local __defer="$2"
|
||||
|
||||
json_init
|
||||
json_add_string name "$__device"
|
||||
json_add_boolean defer "$__defer"
|
||||
|
||||
ubus call network.device set_state "$(json_dump)" 2>/dev/null
|
||||
}
|
||||
|
||||
network_defer_device() { __network_defer "$1" 1; }
|
||||
network_ready_device() { __network_defer "$1" 0; }
|
||||
|
Loading…
Reference in New Issue
Block a user