diff --git a/lgsm/modules/core_exit.sh b/lgsm/modules/core_exit.sh index 496cde4221..989a4c543d 100644 --- a/lgsm/modules/core_exit.sh +++ b/lgsm/modules/core_exit.sh @@ -13,6 +13,8 @@ fn_exit_dev_debug() { echo -e "${moduleselfname} exiting with code: ${exitcode}" if [ -f "${rootdir}/dev-debug.log" ]; then grep -a "modulefile=" "${rootdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log" + elif [ -f "${lgsmlogdir}/dev-debug.log" ]; then + grep -a "modulefile=" "${lgsmlogdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log" fi fi } diff --git a/linuxgsm.sh b/linuxgsm.sh index 395285c7b6..9f3611fed9 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -15,7 +15,11 @@ # Debugging if [ -f ".dev-debug" ]; then - exec 5> dev-debug.log + if [ -f /.dockerenv ]; then + exec 5> /data/log/dev-debug.log + else + exec 5> dev-debug.log + fi BASH_XTRACEFD="5" set -x fi