diff options
author | Phil Dibowitz <phil@ipom.com> | 2016-10-05 17:14:08 +0200 |
---|---|---|
committer | Lukáš Nykrýn <lnykryn@redhat.com> | 2016-10-12 14:30:08 +0200 |
commit | 5c603b1da767ad0075493ca02286312039dbe0dc (patch) | |
tree | 0fbc5df0c3a8b6a37731e0c03473c26c455130fd /sysconfig/network-scripts/ifup-ctc | |
parent | c282b9ebefae10e5b39c404a16a4d2af39d956bf (diff) | |
download | initscripts-5c603b1da767ad0075493ca02286312039dbe0dc.tar initscripts-5c603b1da767ad0075493ca02286312039dbe0dc.tar.gz initscripts-5c603b1da767ad0075493ca02286312039dbe0dc.tar.bz2 initscripts-5c603b1da767ad0075493ca02286312039dbe0dc.tar.xz initscripts-5c603b1da767ad0075493ca02286312039dbe0dc.zip |
[3/3] Remove tabs and fix spacing: ifup/ifdown scripts
Diffstat (limited to 'sysconfig/network-scripts/ifup-ctc')
-rwxr-xr-x | sysconfig/network-scripts/ifup-ctc | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/sysconfig/network-scripts/ifup-ctc b/sysconfig/network-scripts/ifup-ctc index 39d6a09c..83f754a0 100755 --- a/sysconfig/network-scripts/ifup-ctc +++ b/sysconfig/network-scripts/ifup-ctc @@ -19,9 +19,8 @@ CONFIG=$1 [ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG source_config -if [ "$2" = "boot" -a "${ONBOOT}" = "no" ] -then - exit +if [ "$2" = "boot" -a "${ONBOOT}" = "no" ] ; then + exit fi [ -n "${MTU}" ] && ip link set dev ${DEVICE} mtu ${MTU} @@ -32,22 +31,22 @@ ip link set up dev ${DEVICE} # quite a while... timeout=0 while ! ping -w 30 -c 1 ${GATEWAY} &>/dev/null; do - timeout=$(($timeout + 1)) - if [ $timeout = 20 ]; then - net_log $"ERROR: ${DEVICE} did not come up!" - break - fi + timeout=$(($timeout + 1)) + if [ $timeout = 20 ]; then + net_log $"ERROR: ${DEVICE} did not come up!" + break + fi done if [ "${NETWORK}" != "" ] ; then - ip route add to ${GATEWAY} metric 1 dev ${DEVICE} + ip route add to ${GATEWAY} metric 1 dev ${DEVICE} fi if [ "${GATEWAY}" != "" ]; then - if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then - # set up default gateway - ip route replace default ${METRIC:+metric $METRIC} via ${GATEWAY} - fi + if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then + # set up default gateway + ip route replace default ${METRIC:+metric $METRIC} via ${GATEWAY} + fi fi /etc/sysconfig/network-scripts/ifup-post $1 |