Handle case where FUNCNAME[0] is undefined
If FUNCNAME[0] is undefined and 'set -u' has been used it will cause the
devstack run to fail.
Handle undefined values in PS4.
Closes-Bug: #1543749
Change-Id: I06a013a5e7683e3a3461ff06361d867f61d48e6a
diff --git a/stackrc b/stackrc
index 887d4b3..8638a90 100644
--- a/stackrc
+++ b/stackrc
@@ -15,7 +15,7 @@
export LC_ALL
# Make tracing more educational
-export PS4='+ ${BASH_SOURCE}:${FUNCNAME[0]}:L${LINENO}: '
+export PS4='+ ${BASH_SOURCE:-}:${FUNCNAME[0]:-}:L${LINENO:-}: '
# Find the other rc files
RC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)