Factoring out debug into an own function.
[live-boot-grml.git] / scripts / boot / 0110-debug
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
 }