Harald Hoyer 460d2c
From 497916e13b1e7608f1b2278b0222f216fbcd8846 Mon Sep 17 00:00:00 2001
Harald Hoyer 460d2c
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Harald Hoyer 460d2c
Date: Sun, 23 Aug 2020 18:31:11 -0300
Harald Hoyer 460d2c
Subject: [PATCH] dracut.sh: fix some indentation.
Harald Hoyer 460d2c
Harald Hoyer 460d2c
Command level inside conditional and tab/space usage.
Harald Hoyer 460d2c
---
Harald Hoyer 460d2c
 dracut.sh | 38 +++++++++++++++++++-------------------
Harald Hoyer 460d2c
 1 file changed, 19 insertions(+), 19 deletions(-)
Harald Hoyer 460d2c
Harald Hoyer 460d2c
diff --git a/dracut.sh b/dracut.sh
Harald Hoyer 460d2c
index fa2388fe..4d83d3ab 100755
Harald Hoyer 460d2c
--- a/dracut.sh
Harald Hoyer 460d2c
+++ b/dracut.sh
Harald Hoyer 460d2c
@@ -37,7 +37,7 @@ readonly dracut_cmd="$(readlink -f $0)"
Harald Hoyer 460d2c
 set -o pipefail
Harald Hoyer 460d2c
 
Harald Hoyer 460d2c
 usage() {
Harald Hoyer 460d2c
-	[[ $sysroot_l ]] && dracutsysrootdir="$sysroot_l"
Harald Hoyer 460d2c
+    [[ $sysroot_l ]] && dracutsysrootdir="$sysroot_l"
Harald Hoyer 460d2c
     [[ $dracutbasedir ]] || dracutbasedir=$dracutsysrootdir/usr/lib/dracut
Harald Hoyer 460d2c
     if [[ -f $dracutbasedir/dracut-version.sh ]]; then
Harald Hoyer 460d2c
         . $dracutbasedir/dracut-version.sh
Harald Hoyer 460d2c
@@ -436,20 +436,20 @@ unset append_args_l
Harald Hoyer 460d2c
 unset rebuild_file
Harald Hoyer 460d2c
 while :
Harald Hoyer 460d2c
 do
Harald Hoyer 460d2c
-	if [ "$1" == "--" ]; then
Harald Hoyer 460d2c
-	    shift; break
Harald Hoyer 460d2c
-	fi
Harald Hoyer 460d2c
-	if [ "$1" == "--rebuild" ]; then
Harald Hoyer 460d2c
-	    append_args_l="yes"
Harald Hoyer 460d2c
+    if [ "$1" == "--" ]; then
Harald Hoyer 460d2c
+        shift; break
Harald Hoyer 460d2c
+    fi
Harald Hoyer 460d2c
+    if [ "$1" == "--rebuild" ]; then
Harald Hoyer 460d2c
+        append_args_l="yes"
Harald Hoyer 460d2c
             rebuild_file=$2
Harald Hoyer 460d2c
             if [ ! -e $rebuild_file ]; then
Harald Hoyer 460d2c
                 echo "Image file '$rebuild_file', for rebuild, does not exist!"
Harald Hoyer 460d2c
                 exit 1
Harald Hoyer 460d2c
             fi
Harald Hoyer 460d2c
             abs_rebuild_file=$(readlink -f "$rebuild_file") && rebuild_file="$abs_rebuild_file"
Harald Hoyer 460d2c
-	    shift; continue
Harald Hoyer 460d2c
-	fi
Harald Hoyer 460d2c
-	shift
Harald Hoyer 460d2c
+        shift; continue
Harald Hoyer 460d2c
+    fi
Harald Hoyer 460d2c
+    shift
Harald Hoyer 460d2c
 done
Harald Hoyer 460d2c
 
Harald Hoyer 460d2c
 # get output file name and kernel version from command line arguments
Harald Hoyer 460d2c
@@ -944,15 +944,15 @@ case "${drivers_dir}" in
Harald Hoyer 460d2c
     ''|*lib/modules/${kernel}|*lib/modules/${kernel}/) ;;
Harald Hoyer 460d2c
     *)
Harald Hoyer 460d2c
         [[ "$DRACUT_KMODDIR_OVERRIDE" ]] || {
Harald Hoyer 460d2c
-	    printf "%s\n" "dracut: -k/--kmoddir path must contain \"lib/modules\" as a parent of your kernel module directory,"
Harald Hoyer 460d2c
-	    printf "%s\n" "dracut: or modules may not be placed in the correct location inside the initramfs."
Harald Hoyer 460d2c
-	    printf "%s\n" "dracut: was given: ${drivers_dir}"
Harald Hoyer 460d2c
-	    printf "%s\n" "dracut: expected: $(dirname ${drivers_dir})/lib/modules/${kernel}"
Harald Hoyer 460d2c
-	    printf "%s\n" "dracut: Please move your modules into the correct directory structure and pass the new location,"
Harald Hoyer 460d2c
-	    printf "%s\n" "dracut: or set DRACUT_KMODDIR_OVERRIDE=1 to ignore this check."
Harald Hoyer 460d2c
-	    exit 1
Harald Hoyer 460d2c
-	}
Harald Hoyer 460d2c
-	;;
Harald Hoyer 460d2c
+            printf "%s\n" "dracut: -k/--kmoddir path must contain \"lib/modules\" as a parent of your kernel module directory,"
Harald Hoyer 460d2c
+            printf "%s\n" "dracut: or modules may not be placed in the correct location inside the initramfs."
Harald Hoyer 460d2c
+            printf "%s\n" "dracut: was given: ${drivers_dir}"
Harald Hoyer 460d2c
+            printf "%s\n" "dracut: expected: $(dirname ${drivers_dir})/lib/modules/${kernel}"
Harald Hoyer 460d2c
+            printf "%s\n" "dracut: Please move your modules into the correct directory structure and pass the new location,"
Harald Hoyer 460d2c
+            printf "%s\n" "dracut: or set DRACUT_KMODDIR_OVERRIDE=1 to ignore this check."
Harald Hoyer 460d2c
+            exit 1
Harald Hoyer 460d2c
+        }
Harald Hoyer 460d2c
+        ;;
Harald Hoyer 460d2c
 esac
Harald Hoyer 460d2c
 
Harald Hoyer 460d2c
 readonly TMPDIR="$(realpath -e "$tmpdir")"
Harald Hoyer 460d2c
@@ -1993,7 +1993,7 @@ fi
Harald Hoyer 460d2c
 
Harald Hoyer 460d2c
 if (( maxloglvl >= 5 )) && (( verbosity_mod_l >= 0 )); then
Harald Hoyer 460d2c
     if [[ $allowlocal ]]; then
Harald Hoyer 460d2c
-	"$dracutbasedir/lsinitrd.sh" "${DRACUT_TMPDIR}/initramfs.img"| ddebug
Harald Hoyer 460d2c
+        "$dracutbasedir/lsinitrd.sh" "${DRACUT_TMPDIR}/initramfs.img"| ddebug
Harald Hoyer 460d2c
     else
Harald Hoyer 460d2c
         lsinitrd "${DRACUT_TMPDIR}/initramfs.img"| ddebug
Harald Hoyer 460d2c
     fi
Harald Hoyer 460d2c