# handle logout cleanly, so that pam logout sessions are properly registered.
# may only work with version openssh-server 5.1+
# http://bugs.debian.org/471793

. /usr/share/ltsp/ltsp-common-functions

if ! boolean_is_true "$LDM_FORCE_LOGOUT"; then
    # request the ssh master socket to close
    ssh -O exit -S ${LDM_SOCKET} ${LDM_SERVER} 
fi
