diff options
Diffstat (limited to 'sysconfig')
-rwxr-xr-x | sysconfig/network-scripts/ifup-ctc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifup-ctc b/sysconfig/network-scripts/ifup-ctc index 80c84391..56cb490e 100755 --- a/sysconfig/network-scripts/ifup-ctc +++ b/sysconfig/network-scripts/ifup-ctc @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # /etc/sysconfig/network-scripts/ifup-ctc # @@ -25,6 +25,18 @@ fi [ -n "${MTU}" ] && opts="${opts} mtu ${MTU}" ifconfig ${DEVICE} ${IPADDR} ${opts} pointopoint ${REMIP} + +# Wait for the device to come up - the chandev'ified ctc driver can take +# quite a while... +timeout=0 +while ! ping -w 30 -c ${REMIP} &>/dev/null; do + timeout=$(($timeout + 1)) + if [ $timeout = 20 ]; then + echo $"ERROR: ${DEVICE} did not come up!" + break + fi +done + if [ "${NETWORK}" != "" ] ; then route add -net ${NETWORK} netmask ${NETMASK} ${DEVICE} fi |