summaryrefslogtreecommitdiff
path: root/modules.d
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2010-01-15 12:34:50 +0100
committerHarald Hoyer <harald@redhat.com>2010-01-15 14:07:54 +0100
commit4bb570c9a4d3060a75ef61c45a8fa5eb24fa2af9 (patch)
tree0cc98b3ab595a0384bc80bf243abad3c44281e75 /modules.d
parent0e8b76a57e3a63941f06b730a10ee2578f290765 (diff)
downloaddracut-4bb570c9a4d3060a75ef61c45a8fa5eb24fa2af9.tar.gz
dracut-4bb570c9a4d3060a75ef61c45a8fa5eb24fa2af9.tar.bz2
dracut-4bb570c9a4d3060a75ef61c45a8fa5eb24fa2af9.zip
dracut-lib: do not leave debug mode in getarg and getargs
Diffstat (limited to 'modules.d')
-rw-r--r--modules.d/99base/dracut-lib.sh37
1 files changed, 16 insertions, 21 deletions
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
index 42db21a4..5b2b2c1a 100644
--- a/modules.d/99base/dracut-lib.sh
+++ b/modules.d/99base/dracut-lib.sh
@@ -1,5 +1,4 @@
getarg() {
- set +x
local o line
if [ -z "$CMDLINE" ]; then
if [ -e /etc/cmdline ]; then
@@ -12,28 +11,12 @@ getarg() {
fi
for o in $CMDLINE; do
[ "$o" = "$1" ] && return 0
- [ "${o%%=*}" = "${1%=}" ] && { echo ${o#*=}; setdebug; return 0; }
+ [ "${o%%=*}" = "${1%=}" ] && { echo ${o#*=}; return 0; }
done
- setdebug
return 1
}
-setdebug() {
- if [ -z "$RDDEBUG" ]; then
- if [ -e /proc/cmdline ]; then
- RDDEBUG=no
- if getarg rdinitdebug; then
- RDDEBUG=yes
- fi
- fi
- fi
- [ "$RDDEBUG" = "yes" ] && set -x
-}
-
-setdebug
-
getargs() {
- set +x
local o line found
if [ -z "$CMDLINE" ]; then
if [ -e /etc/cmdline ]; then
@@ -51,11 +34,23 @@ getargs() {
found=1;
fi
done
- [ -n "$found" ] && { setdebug; return 0;}
- setdebug
- return 1
+ [ -n "$found" ] && return 0
+ return 1;
}
+setdebug() {
+ if [ -z "$RDDEBUG" ]; then
+ if [ -e /proc/cmdline ]; then
+ RDDEBUG=no
+ if getarg rdinitdebug; then
+ RDDEBUG=yes
+ fi
+ fi
+ fi
+ [ "$RDDEBUG" = "yes" ] && set -x
+}
+
+
source_all() {
local f
[ "$1" ] && [ -d "/$1" ] || return