Factoring out debug into an own function.
authorDaniel Baumann <daniel@debian.org>
Wed, 25 Jul 2012 14:56:36 +0000 (16:56 +0200)
committerDaniel Baumann <daniel@debian.org>
Wed, 25 Jul 2012 15:25:04 +0000 (17:25 +0200)
scripts/boot/0110-debug [moved from scripts/boot/0110-cmdline with 67% similarity]
scripts/boot/9990-main.sh

similarity index 67%
rename from scripts/boot/0110-cmdline
rename to scripts/boot/0110-debug
index 087549d..a74dcb7 100755 (executable)
@@ -2,15 +2,21 @@
 
 #set -e
 
-Cmdline ()
+Debug ()
 {
        for _PARAMETER in ${_CMDLINE}
        do
                case "${_PARAMETER}" in
-                       # Special options
                        live-boot.debug|debug)
                                LIVE_DEBUG="true"
                                ;;
                esac
        done
+
+       if [ "${LIVE_DEBUG}" != "true" ]
+       then
+               return 0
+       fi
+
+       set -x
 }
index 8dcdfe6..2cf1d7e 100755 (executable)
@@ -19,14 +19,9 @@ Main ()
        . /live.vars
 
        _CMDLINE="$(cat /proc/cmdline)"
-       Cmdline
        Cmdline_old
 
-       case "${LIVE_DEBUG}" in
-               true)
-                       set -x
-                       ;;
-       esac
+       Debug
 
        Read_only