From 3c9a0742ac151c0557416701bb1b1c8e0534f35b Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Wed, 18 Jul 2007 12:07:33 +0000
Subject: [PATCH] Replace tabs with spaces.

Reviewed-by: iustinp
---
 configure.ac         |  4 +--
 daemons/ganeti-noded | 16 ++++++------
 ganeti.initd         | 60 +++++++++++++++++++++++---------------------
 tools/lvmstrap       |  2 +-
 4 files changed, 42 insertions(+), 40 deletions(-)

diff --git a/configure.ac b/configure.ac
index ec949ee10..66fe35e96 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,6 +21,6 @@ AM_PATH_PYTHON(2.4)
 # Checks for library functions.
 
 AC_CONFIG_FILES([Makefile man/Makefile docs/Makefile 
-		testing/Makefile tools/Makefile
-		lib/Makefile scripts/Makefile daemons/Makefile])
+  testing/Makefile tools/Makefile
+  lib/Makefile scripts/Makefile daemons/Makefile])
 AC_OUTPUT
diff --git a/daemons/ganeti-noded b/daemons/ganeti-noded
index de1f43896..9c09140ce 100755
--- a/daemons/ganeti-noded
+++ b/daemons/ganeti-noded
@@ -366,20 +366,20 @@ def createDaemon():
     pid = os.fork()
   except OSError, e:
     raise Exception, "%s [%d]" % (e.strerror, e.errno)
-  if (pid == 0):	# The first child.
+  if (pid == 0):  # The first child.
     os.setsid()
     try:
-      pid = os.fork()	# Fork a second child.
+      pid = os.fork() # Fork a second child.
     except OSError, e:
       raise Exception, "%s [%d]" % (e.strerror, e.errno)
-    if (pid == 0):	# The second child.
+    if (pid == 0):  # The second child.
       os.chdir(WORKDIR)
       os.umask(UMASK)
     else:
       # exit() or _exit()?  See below.
-      os._exit(0)	# Exit parent (the first child) of the second child.
+      os._exit(0) # Exit parent (the first child) of the second child.
   else:
-    os._exit(0)	# Exit parent of the first child.
+    os._exit(0) # Exit parent of the first child.
   maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
   if (maxfd == resource.RLIM_INFINITY):
     maxfd = MAXFD
@@ -388,12 +388,12 @@ def createDaemon():
   for fd in range(0, maxfd):
     try:
       os.close(fd)
-    except OSError:	# ERROR, fd wasn't open to begin with (ignored)
+    except OSError: # ERROR, fd wasn't open to begin with (ignored)
       pass
   os.open(REDIRECT_TO, os.O_RDWR|os.O_CREAT|os.O_APPEND) # standard input (0)
   # Duplicate standard input to standard output and standard error.
-  os.dup2(0, 1)			# standard output (1)
-  os.dup2(0, 2)			# standard error (2)
+  os.dup2(0, 1)     # standard output (1)
+  os.dup2(0, 2)     # standard error (2)
   return(0)
 
 
diff --git a/ganeti.initd b/ganeti.initd
index a10fe996a..5af2c0be4 100755
--- a/ganeti.initd
+++ b/ganeti.initd
@@ -15,38 +15,40 @@ set -e
 . /lib/lsb/init-functions
 
 check_config() {
-	for fname in /var/lib/ganeti/ssconf_node_pass /var/lib/ganeti/server.pem; do
-		if ! [ -f "$fname" ]; then
-			log_end_msg 0
-			log_warning_msg "Config $fname not there, will not run."
-			exit 0
-		fi
-	done
+    for fname in /var/lib/ganeti/ssconf_node_pass /var/lib/ganeti/server.pem; do
+        if ! [ -f "$fname" ]; then
+            log_end_msg 0
+            log_warning_msg "Config $fname not there, will not run."
+            exit 0
+        fi
+    done
 }
 
 case "$1" in
-  start)
-	log_begin_msg "Starting $DESC..."
-	check_config
-	start-stop-daemon --start --quiet --exec $DAEMON || log_end_msg 1
-	log_end_msg 0
-	;;
-  stop)
-	log_begin_msg "Stopping $DESC..."
-	start-stop-daemon --stop --quiet --name $NAME || log_end_msg 1
-	log_end_msg 0
-	;;
-  restart|force-reload)
-	log_begin_msg "Reloading $DESC..."
-	start-stop-daemon --stop --quiet --oknodo --retry 30 --name $NAME
-	check_config
-	start-stop-daemon --start --quiet --exec $DAEMON || log_end_msg 1
-	log_end_msg 0
-	;;
-  *)
-	log_success_msg "Usage: $SCRIPTNAME {start|stop|force-reload|restart}"
-	exit 1
-	;;
+    start)
+        log_begin_msg "Starting $DESC..."
+        check_config
+        start-stop-daemon --start --quiet --exec $DAEMON || log_end_msg 1
+        log_end_msg 0
+    ;;
+    stop)
+        log_begin_msg "Stopping $DESC..."
+        start-stop-daemon --stop --quiet --name $NAME || log_end_msg 1
+        log_end_msg 0
+    ;;
+    restart|force-reload)
+        log_begin_msg "Reloading $DESC..."
+        start-stop-daemon --stop --quiet --oknodo --retry 30 --name $NAME
+        check_config
+        start-stop-daemon --start --quiet --exec $DAEMON || log_end_msg 1
+        log_end_msg 0
+    ;;
+    *)
+        log_success_msg "Usage: $SCRIPTNAME {start|stop|force-reload|restart}"
+        exit 1
+    ;;
 esac
 
 exit 0
+
+# vim: set sw=4 sts=4 et foldmethod=marker :
diff --git a/tools/lvmstrap b/tools/lvmstrap
index 199f1ee1d..4d514cd8e 100755
--- a/tools/lvmstrap
+++ b/tools/lvmstrap
@@ -376,7 +376,7 @@ def GetDiskList():
   for name in os.listdir("/sys/block"):
     if (not name.startswith("hd") and
         not name.startswith("sd") and
-	not name.startswith("ubd")):
+        not name.startswith("ubd")):
       continue
 
     size = ReadSize("/sys/block/%s" % name)
-- 
GitLab