]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
base/dracut-lib.sh: s/RDDEBUG/RD_DEBUG/g
authorHarald Hoyer <harald@redhat.com>
Fri, 25 Mar 2011 12:32:02 +0000 (13:32 +0100)
committerHarald Hoyer <harald@redhat.com>
Fri, 25 Mar 2011 15:10:47 +0000 (16:10 +0100)
RDDEBUG would be unset by the environment cleanup in init and logging
would be turned off afterwards.

modules.d/99base/dracut-lib.sh
modules.d/99base/init

index c870bd2385b71ca82cace98bb2d0658254589baa..a5406ab953d8818ae26d289c4c22c9df66fb6ff3 100755 (executable)
@@ -69,24 +69,24 @@ getarg() {
         case $1 in
             -y) if _dogetarg $2; then
                     echo 1
-                    [ "$RDDEBUG" = "yes" ] && set -x
+                    [ "$RD_DEBUG" = "yes" ] && set -x
                     return 0
                 fi
                 shift 2;;
             -n) if _dogetarg $2; then
                     echo 0;
-                    [ "$RDDEBUG" = "yes" ] && set -x
+                    [ "$RD_DEBUG" = "yes" ] && set -x
                     return 1
                 fi
                 shift 2;;
             *)  if _dogetarg $1; then
-                    [ "$RDDEBUG" = "yes" ] && set -x
+                    [ "$RD_DEBUG" = "yes" ] && set -x
                     return 0;
                 fi
                 shift;;
         esac
     done
-    [ "$RDDEBUG" = "yes" ] && set -x 
+    [ "$RD_DEBUG" = "yes" ] && set -x 
     return 1
 }
 
@@ -134,10 +134,10 @@ getargs() {
     done
     if [ -n "$_val" ]; then
         echo -n $_val
-        [ "$RDDEBUG" = "yes" ] && set -x 
+        [ "$RD_DEBUG" = "yes" ] && set -x 
         return 0
     fi
-    [ "$RDDEBUG" = "yes" ] && set -x 
+    [ "$RD_DEBUG" = "yes" ] && set -x 
     return 1;
 }
 
@@ -195,16 +195,16 @@ splitsep() {
 }
 
 setdebug() {
-    if [ -z "$RDDEBUG" ]; then
+    if [ -z "$RD_DEBUG" ]; then
         if [ -e /proc/cmdline ]; then
-            RDDEBUG=no
+            RD_DEBUG=no
             if getargbool 0 rd.debug -y rdinitdebug -y rdnetdebug; then
-                RDDEBUG=yes 
+                RD_DEBUG=yes 
             fi
         fi
-        export RDDEBUG
+        export RD_DEBUG
     fi
-    [ "$RDDEBUG" = "yes" ] && set -x 
+    [ "$RD_DEBUG" = "yes" ] && set -x 
 }
 
 setdebug
index ffab217d95d374af6db2ccc08bd45ed1fa74c02b..2b8cfd9d178a54cca07c2d00fd2414224bee07b8 100755 (executable)
@@ -386,6 +386,7 @@ fi
 if [ -f /etc/capsdrop ]; then
     . /etc/capsdrop
     info "Calling $INIT with capabilities $CAPS_INIT_DROP dropped."
+    unset RD_DEBUG
     exec /usr/sbin/capsh --drop="$CAPS_INIT_DROP" -- -c "exec /sbin/switch_root \"$NEWROOT\" \"$INIT\" $initargs" || {
        warn "Command:"
        warn capsh --drop=$CAPS_INIT_DROP -- -c exec switch_root "$NEWROOT" "$INIT" $initargs
@@ -393,6 +394,7 @@ if [ -f /etc/capsdrop ]; then
        emergency_shell
     }
 else
+    unset RD_DEBUG
     exec /sbin/switch_root "$NEWROOT" "$INIT" $initargs || {
        warn "Something went very badly wrong in the initramfs.  Please "
        warn "file a bug against dracut."