projects
/
platform
/
upstream
/
dracut.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
efa5eb4
)
Add function linkup
author
dyoung@redhat.com
<dyoung@redhat.com>
Wed, 12 Dec 2012 04:23:22 +0000
(12:23 +0800)
committer
Harald Hoyer
<harald@redhat.com>
Fri, 14 Dec 2012 08:08:59 +0000
(09:08 +0100)
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>
modules.d/40network/net-lib.sh
patch
|
blob
|
history
diff --git
a/modules.d/40network/net-lib.sh
b/modules.d/40network/net-lib.sh
index
8bab2b6
..
142aa68
100644
(file)
--- 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
+}
+