Several bug fixes, read changelog for details.

pull/3/head
Ghost1227 15 years ago
parent ab7dca92d0
commit 760ff8acf8

@ -8,3 +8,9 @@ Version 0.1b (2009-11-09)
Version 0.2 (2009-11-10) Version 0.2 (2009-11-10)
- Added shutdown option - Added shutdown option
- Added ability to set login shell (fix for some foreign layouts) - Added ability to set login shell (fix for some foreign layouts)
Version 0.3 (2009-11-18)
- Fixed X incrementing function (thanks Andrwe)
- Fixed an issue with allowshutdown off and allowconsole on
- Code cleanup (thanks Brisbin33)
- Fixed issue with profile.d execution order

@ -4,6 +4,9 @@
# #
# Copyright (C) 2009, Daniel J Griffiths <ghost1227@archlinux.us> # Copyright (C) 2009, Daniel J Griffiths <ghost1227@archlinux.us>
# Thanks to: # Thanks to:
# Andrwe..........beta-testing and submitting the fix for the all
# important X incrementation function
# brisbin33.......code cleanup
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -61,11 +64,11 @@ fi
# otherwise, increment. # otherwise, increment.
if [[ ${locktty} == "yes" ]]; then if [[ ${locktty} == "yes" ]]; then
# Verify display exists # Verify display exists
if `echo ""${display}"" | grep [^0-9] &> /dev/null`; then if [ -n "${display//[0-9]/}" ]; then
display=0 display=0
fi fi
# Activate existing X session # Activate existing X session
if [[ `xdpyinfo -display :${display}.0 &> /dev/null` != "1" ]]; then if xdpyinfo -display :${display}.0 &> /dev/null; then
let tty=${display}+${xtty} let tty=${display}+${xtty}
chvt ${tty} chvt ${tty}
exit 0 exit 0
@ -73,8 +76,8 @@ if [[ ${locktty} == "yes" ]]; then
else else
# Get the first empty display # Get the first empty display
display=0 display=0
while ${display} < 7; do while [ ${display} -lt 7 ]; do
if [[ `xdpyinfo -display :${display}.0 &> /dev/null` != "1" ]]; then if xdpyinfo -display :${display}.0 &> /dev/null; then
let display=${display}+1 let display=${display}+1
else else
break break
@ -94,6 +97,9 @@ mainmenu() {
# Check if console access is allowed # Check if console access is allowed
if [[ ${allowconsole} == "yes" ]]; then if [[ ${allowconsole} == "yes" ]]; then
if [[ ${allowshutdown} != "yes" ]]; then
let halt=99
fi
let console=${#wmdisplist[@]} let console=${#wmdisplist[@]}
menu=$(echo -ne "${menu} ${console} Console ") menu=$(echo -ne "${menu} ${console} Console ")
fi fi
@ -106,10 +112,12 @@ mainmenu() {
let halt=${#wmdisplist[@]}+1 let halt=${#wmdisplist[@]}+1
fi fi
menu=$(echo -ne "${menu} ${halt} Shutdown ") menu=$(echo -ne "${menu} ${halt} Shutdown ")
fi fi
echo "halt=${halt} console=${console} wm='${wm}'" > ~/cdm.tmp
# Override dialog display if only one option is available # Override dialog display if only one option is available
if [[ ${allowconsole} != "yes" ]] && [[ ${#wmdisplist[@]} == 1 ]]; then if [[ ${allowconsole} != "yes" ]] && [[ ${allowshutdown} != "yes" ]] && [[ ${#wmdisplist[@]} == 1 ]]; then
wm=${wmbinlist[@]} wm=${wmbinlist[@]}
else else
# Display selection dialog # Display selection dialog
@ -159,14 +167,14 @@ shutdownmenu() {
xstart() { xstart() {
# Start X # Start X
if [[ ${loginshell} == "yes" ]]; then if [ ${loginshell} == "yes" ]; then
if [[ ${wm_bin} == "gnome-session" ]]; then if [ ${wm_bin} == "gnome-session" ]; then
exec bash --login -c startx /usr/share/cdm/xinitrc -- :${display} &> /dev/null & exec bash --login -c "startx /usr/share/cdm/xinitrc -- :${display} &> /dev/null" &
else else
exec ck-launch-session bash --login -c startx /usr/share/cdm/xinitrc -- :${display} &> /dev/null & exec ck-launch-session bash --login -c "startx /usr/share/cdm/xinitrc -- :${display} &> /dev/null" &
fi fi
else else
if [[ ${wm_bin} == "gnome-session" ]]; then if [ ${wm_bin} == "gnome-session" ]; then
exec startx /usr/share/cdm/xinitrc -- :${display} &> /dev/null & exec startx /usr/share/cdm/xinitrc -- :${display} &> /dev/null &
else else
exec ck-launch-session startx /usr/share/cdm/xinitrc -- :${display} &> /dev/null & exec ck-launch-session startx /usr/share/cdm/xinitrc -- :${display} &> /dev/null &

Loading…
Cancel
Save