From e8ced87a39fc0a748506f0663ac61449685d5957 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 25 Jul 2012 16:56:36 +0200 Subject: Factoring out debug into an own function. --- scripts/boot/0110-cmdline | 16 ---------------- scripts/boot/0110-debug | 22 ++++++++++++++++++++++ scripts/boot/9990-main.sh | 7 +------ 3 files changed, 23 insertions(+), 22 deletions(-) delete mode 100755 scripts/boot/0110-cmdline create mode 100755 scripts/boot/0110-debug (limited to 'scripts') diff --git a/scripts/boot/0110-cmdline b/scripts/boot/0110-cmdline deleted file mode 100755 index 087549d..0000000 --- a/scripts/boot/0110-cmdline +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -#set -e - -Cmdline () -{ - for _PARAMETER in ${_CMDLINE} - do - case "${_PARAMETER}" in - # Special options - live-boot.debug|debug) - LIVE_DEBUG="true" - ;; - esac - done -} diff --git a/scripts/boot/0110-debug b/scripts/boot/0110-debug new file mode 100755 index 0000000..a74dcb7 --- /dev/null +++ b/scripts/boot/0110-debug @@ -0,0 +1,22 @@ +#!/bin/sh + +#set -e + +Debug () +{ + for _PARAMETER in ${_CMDLINE} + do + case "${_PARAMETER}" in + live-boot.debug|debug) + LIVE_DEBUG="true" + ;; + esac + done + + if [ "${LIVE_DEBUG}" != "true" ] + then + return 0 + fi + + set -x +} diff --git a/scripts/boot/9990-main.sh b/scripts/boot/9990-main.sh index 8dcdfe6..2cf1d7e 100755 --- a/scripts/boot/9990-main.sh +++ b/scripts/boot/9990-main.sh @@ -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 -- cgit v1.2.3