From 1e00889cb0a4c4399e8f361c2474bb8f76a8ad04 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Thu, 19 Jul 2012 14:03:34 +0200
Subject: [PATCH] Re-indent kvm-ifup.in
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

By a strange accident, this file seems to be tabified, instead of our
own 2-space rule. Re-indent it and also break one long line.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: RenΓ© Nussbaumer <rn@google.com>
---
 tools/kvm-ifup.in | 69 ++++++++++++++++++++++++-----------------------
 1 file changed, 35 insertions(+), 34 deletions(-)

diff --git a/tools/kvm-ifup.in b/tools/kvm-ifup.in
index a5e8c1b85..e567f12dc 100644
--- a/tools/kvm-ifup.in
+++ b/tools/kvm-ifup.in
@@ -19,56 +19,57 @@
 # 02110-1301, USA.
 
 if [ -z "$INTERFACE" ]; then
-	echo "No network interface specified"
-	exit 1
+  echo "No network interface specified"
+  exit 1
 fi
 
 if [ -z "$MODE" ]; then
-	echo "MODE not specified"
-	exit 1
+  echo "MODE not specified"
+  exit 1
 fi
 
 # Execute the user-supplied network script, if applicable
 if [ -x "@SYSCONFDIR@/ganeti/kvm-vif-bridge" ]; then
-	exec @SYSCONFDIR@/ganeti/kvm-vif-bridge
+  exec @SYSCONFDIR@/ganeti/kvm-vif-bridge
 fi
 
 if [ "$MODE" = "bridged" ]; then
-	# Fix the autogenerated MAC to have the first octet set to "fe"
-	# to discourage the bridge from using the TAP dev's MAC
-	FIXED_MAC=$(ip link show $INTERFACE | awk '{if ($1 == "link/ether") printf("fe%s",substr($2,3,15))}')
-	ip link set $INTERFACE address $FIXED_MAC
+  # Fix the autogenerated MAC to have the first octet set to "fe"
+  # to discourage the bridge from using the TAP dev's MAC
+  FIXED_MAC=$(ip link show $INTERFACE | \
+    awk '{if ($1 == "link/ether") printf("fe%s",substr($2,3,15))}')
+  ip link set $INTERFACE address $FIXED_MAC
 
-	ip link set $INTERFACE up
-	ip link set $INTERFACE mtu $(</sys/class/net/${BRIDGE}/mtu)
+  ip link set $INTERFACE up
+  ip link set $INTERFACE mtu $(</sys/class/net/${BRIDGE}/mtu)
 
-	# Connect the interface to the bridge
-	brctl addif $BRIDGE $INTERFACE
+  # Connect the interface to the bridge
+  brctl addif $BRIDGE $INTERFACE
 else
-	ip link set $INTERFACE up
+  ip link set $INTERFACE up
 
-	if [ -z "$IP" ]; then
-		echo "Routed NIC but no IP address specified"
-		exit 1
-	fi
+  if [ -z "$IP" ]; then
+    echo "Routed NIC but no IP address specified"
+    exit 1
+  fi
 
-	# Route traffic targeted at the IP to the interface
-	if [ -n "$LINK" ]; then
-		while ip rule del dev $INTERFACE; do :; done
-		ip rule add dev $INTERFACE table $LINK
-		ip route replace $IP table $LINK proto static dev $INTERFACE
+  # Route traffic targeted at the IP to the interface
+  if [ -n "$LINK" ]; then
+    while ip rule del dev $INTERFACE; do :; done
+    ip rule add dev $INTERFACE table $LINK
+    ip route replace $IP table $LINK proto static dev $INTERFACE
 
-	else
-		ip route replace $IP proto static dev $INTERFACE
-	fi
+  else
+    ip route replace $IP proto static dev $INTERFACE
+  fi
 
-	if [ -d "/proc/sys/net/ipv4/conf/$INTERFACE" ]; then
-		echo 1 > /proc/sys/net/ipv4/conf/$INTERFACE/proxy_arp
-		echo 1 > /proc/sys/net/ipv4/conf/$INTERFACE/forwarding
-	fi
+  if [ -d "/proc/sys/net/ipv4/conf/$INTERFACE" ]; then
+    echo 1 > /proc/sys/net/ipv4/conf/$INTERFACE/proxy_arp
+    echo 1 > /proc/sys/net/ipv4/conf/$INTERFACE/forwarding
+  fi
 
-	if [ -d "/proc/sys/net/ipv6/conf/$INTERFACE" ]; then
-		echo 1 > /proc/sys/net/ipv6/conf/$INTERFACE/proxy_ndp
-		echo 1 > /proc/sys/net/ipv6/conf/$INTERFACE/forwarding
-	fi
+  if [ -d "/proc/sys/net/ipv6/conf/$INTERFACE" ]; then
+    echo 1 > /proc/sys/net/ipv6/conf/$INTERFACE/proxy_ndp
+    echo 1 > /proc/sys/net/ipv6/conf/$INTERFACE/forwarding
+  fi
 fi
-- 
GitLab