Moved handler for root login to profile script.

pull/3/head
Ghost1227 15 years ago
parent 28ef4a44b7
commit 37a09937db

@ -9,6 +9,6 @@ else
install -m755 cdm /usr/bin/
install -Dm644 cdmrc /etc/cdmrc
install -m644 xinitrc /usr/share/cdm/
install -Dm755 cdm-profile.sh /etc/profile.d/cdm-profile.sh
install -Dm755 zzz-cdm-profile.sh /etc/profile.d/zzz-cdm-profile.sh
cp -Rf themes /usr/share/cdm/
fi

@ -24,19 +24,13 @@
# MA 02110-1301, USA.
name="Console Display Manager"
ver="0.2"
ver="0.3.1"
info="\e[1;34m==>\e[1;37m"
error="\e[1;31m==>\e[1;37m"
success="\e[1;32m==>\e[1;37m"
reset="\e[0m"
trap "" 2 20
# Drop root to console
if [[ $EUID -eq 0 ]]; then
${SHELL}
exit 0
fi
# Source cdm configuration
if [ -f /etc/cdmrc ]; then
source /etc/cdmrc
@ -114,6 +108,8 @@ mainmenu() {
menu=$(echo -ne "${menu} ${halt} Shutdown ")
fi
echo "halt=${halt} console=${console} wm='${wm}'" > ~/cdm.tmp
# Override dialog display if only one option is available
if [[ ${allowconsole} != "yes" ]] && [[ ${allowshutdown} != "yes" ]] && [[ ${#wmdisplist[@]} == 1 ]]; then
wm=${wmbinlist[@]}

@ -1,5 +1,9 @@
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
# Drop root to console
if [[ $EUID -eq 0 ]]; then
${SHELL}
exit 0
fi
cdm
exit
exit 0
fi

Loading…
Cancel
Save