diff options
author | Lucas N. Ferreira <lnf07@c3sl.ufpr.br> | 2010-08-16 21:14:23 -0300 |
---|---|---|
committer | Lucas N. Ferreira <lnf07@c3sl.ufpr.br> | 2010-08-16 21:14:23 -0300 |
commit | 04bb8fdd59a1010bc9ccd99ace8b12f423508f42 (patch) | |
tree | bf51e799e359659602df57bebaeeeb96641781d1 | |
parent | 2d1c2628b5de11dd7991645d30ac2f4cabd09730 (diff) |
Commented lines that makes ConsoleKit crash.
-rwxr-xr-x | src/usbseat.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/usbseat.sh b/src/usbseat.sh index 75993c0..de45f66 100755 --- a/src/usbseat.sh +++ b/src/usbseat.sh @@ -35,10 +35,14 @@ if [ "$ACTION" == "remove" ]; then echo "Removing $SEAT_NAME." &>> /var/log/usbseat.log + # Remove the lock, so now we can use this seat_id for start a new seat. rm -f /tmp/$SEAT_NAME.lock - SESSION_ID=`$CK_LIST_SESSION -a | grep -B3 usbseat$SEAT_NUMBER | head -n1` - $CK_SEAT_TOOL -d --session-id ${SESSION_ID%\:} &>> /var/log/usbseat.log +# The followling lines are commented because ConsoleKit daemon crashes if +# the usbseats are connected and disconected several times. +# +# SESSION_ID=`$CK_LIST_SESSION -a | grep -B3 usbseat$SEAT_NUMBER | head -n1` +# $CK_SEAT_TOOL -d --session-id ${SESSION_ID%\:} &>> /var/log/usbseat.log echo "$SESSION_ID removed." &>> /var/log/usbseat.log else @@ -49,9 +53,14 @@ else exit 0 fi + # Check if we have a usefull seat. if [[ -e /dev/usbseat/$SEAT_NAME/keyboard && -e /dev/usbseat/$SEAT_NAME/mouse && -e /dev/usbseat/$SEAT_NAME/display ]]; then echo "Starting ${SEAT_NAME}" &>> /var/log/usbseat.log + + # Every time a device is connected to a seat, this script will be + # called, so create a lock file for start the seat only when is + # necessary touch /tmp/$SEAT_NAME.lock # We have a newly complete seat. Start it. |