From 874821041103acea505d4374af9040bc032a2317 Mon Sep 17 00:00:00 2001 From: Ghost1227 Date: Sun, 24 Jan 2010 17:39:28 -0600 Subject: [PATCH] Fix critical issue with exec, fixed SHLVL --- src/cdm | 2 ++ src/zzz-cdm-profile.sh | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cdm b/src/cdm index 1f1a9aa..8c7d9e0 100755 --- a/src/cdm +++ b/src/cdm @@ -182,6 +182,8 @@ mainmenu() { # Set wm_bin clear if [[ ${wm} -eq ${console} ]]; then + #Fix SHLVL + export SHLVL=$((SHLVL-1)) exec ${SHELL} elif [[ ${wm} -eq ${halt} ]]; then shutdownmenu diff --git a/src/zzz-cdm-profile.sh b/src/zzz-cdm-profile.sh index ed21f27..27cad19 100755 --- a/src/zzz-cdm-profile.sh +++ b/src/zzz-cdm-profile.sh @@ -3,5 +3,6 @@ if [[ -z "$DISPLAY" && -z "$SSH_TTY" && $(tty) = /dev/tty* ]]; then if [[ $EUID -eq 0 ]]; then exec ${SHELL} fi - exec cdm + cdm + exit 0 fi