From: Harald Hoyer Date: Mon, 11 Apr 2011 11:34:06 +0000 (+0200) Subject: base/dracut-lib.sh: turn on PS4 for bash debugging X-Git-Tag: 011~106 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d837ebf2a28a06f85c8d3dc9b802565f83d123a;p=platform%2Fupstream%2Fdracut.git base/dracut-lib.sh: turn on PS4 for bash debugging --- diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index 48403cf..e976351 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -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