base/dracut-lib.sh: turn on PS4 for bash debugging
authorHarald Hoyer <harald@redhat.com>
Mon, 11 Apr 2011 11:34:06 +0000 (13:34 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 11 Apr 2011 11:34:06 +0000 (13:34 +0200)
modules.d/99base/dracut-lib.sh

index 48403cf..e976351 100755 (executable)
@@ -200,7 +200,9 @@ setdebug() {
             RD_DEBUG=no
             if getargbool 0 rd.debug -y rdinitdebug -y rdnetdebug; then
                 RD_DEBUG=yes 
-            fi
+                [ -n "$BASH" ] && \
+                    export PS4='${BASH_SOURCE}@${LINENO}(${FUNCNAME[0]}): ';
+           fi
         fi
         export RD_DEBUG
     fi