Add function linkup

set link up usually include two steps, ip link set <dev> up and
wait_for_if_up <dev>. Now do these two steps in one function linkup.
Later patch will add other code into it.

Signed-off-by: Dave Young <dyoung@redhat.com>
master
dyoung@redhat.com 2012-12-12 12:23:22 +08:00 committed by Harald Hoyer
parent efa5eb424d
commit b455451f49
1 changed files with 5 additions and 0 deletions

View File

@ -345,3 +345,8 @@ wait_for_route_ok() {
done
return 1
}

linkup() {
ip link set $1 up 2>/dev/null && wait_for_if_up $1 2>/dev/null
}