From b455451f49cdcf0b48b3c8c5f5d81754fc259011 Mon Sep 17 00:00:00 2001 From: "dyoung@redhat.com" Date: Wed, 12 Dec 2012 12:23:22 +0800 Subject: [PATCH] Add function linkup set link up usually include two steps, ip link set up and wait_for_if_up . Now do these two steps in one function linkup. Later patch will add other code into it. Signed-off-by: Dave Young --- modules.d/40network/net-lib.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh index 8bab2b6..142aa68 100644 --- a/modules.d/40network/net-lib.sh +++ b/modules.d/40network/net-lib.sh @@ -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 +} + -- 2.7.4