summaryrefslogtreecommitdiffstats
path: root/testModule/debugging_tools/network.functions
diff options
context:
space:
mode:
authorJonathan Bauer2015-05-27 16:32:57 +0200
committerJonathan Bauer2015-05-27 16:32:57 +0200
commit0abace2bbec9e17a3630c463e4e3c329c967334b (patch)
tree986a9bebd62c2dd596c85bf44bbec68d00cccd13 /testModule/debugging_tools/network.functions
parentremoved hacked systemd rpms and grub2.conf (diff)
downloadsystemd-init-0abace2bbec9e17a3630c463e4e3c329c967334b.tar.gz
systemd-init-0abace2bbec9e17a3630c463e4e3c329c967334b.tar.xz
systemd-init-0abace2bbec9e17a3630c463e4e3c329c967334b.zip
restructuring & bit of documentation ;)
dracut module now in 'dnbd3-qcow2-rootfs'. ALLLLL dracut related stuff goes in here!
Diffstat (limited to 'testModule/debugging_tools/network.functions')
-rw-r--r--testModule/debugging_tools/network.functions23
1 files changed, 0 insertions, 23 deletions
diff --git a/testModule/debugging_tools/network.functions b/testModule/debugging_tools/network.functions
deleted file mode 100644
index 89ca5a20..00000000
--- a/testModule/debugging_tools/network.functions
+++ /dev/null
@@ -1,23 +0,0 @@
-wait_for_iface() {
- local DEVICE=$1
- local TIMEOUT=10
- echo -n "Waiting for interface $DEVICE: "
- # Some systems don't have operstate. Seems to be hardware dependent
- [ ! -e "/sys/class/net/${DEVICE}/operstate" ] && usleep 10000
- if [ -e "/sys/class/net/${DEVICE}/operstate" ]; then
- while true; do
- # check linkstate
- [ "x$(cat "/sys/class/net/${DEVICE}/operstate")" == "xup" ] && break
- TIMEOUT=$(( $TIMEOUT - 1 )) # don't wait forever, the pcnet iface of vmware will never be "up" although it's working
- [ "$TIMEOUT" -le 0 ] && break
- # else
- echo -n "."
- usleep 500000
- done
- else
- # we really don't have a operstate .. then just wait a sec and hope for the best.
- sleep 1
- fi
- echo ".$(cat "/sys/class/net/${DEVICE}/operstate" 2>/dev/null)"
-}
-true