#!/bin/sh # # Copyright (c) 2002 McQuillan Systems, LLC # # Author: James A. McQuillan # # 2005, Matt Zimmerman # 2006, Oliver Grawert # 2007, Scott Balneaves # 2008, Warren Togami # Stephane Graber # Vagrant Cascadian # Gideon Romm # 2012, Alkis Georgopoulos # # 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 the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, you can find it on the World Wide # Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # MA 02110-1301, USA. # # Load LTSP configuration # ltsp_config sources ltsp-client-functions . /usr/share/ltsp/ltsp_config case "$1" in [0-1][0-9]) num="$1" ;; *) die "Usage: $0 [01..12]" ;; esac while true; do # Wait until this is the active vt before launching the screen script while [ $(fgconsole) -ne "$num" ]; do sleep 2 done if [ -f /etc/ltsp/getltscfg-cluster.conf ]; then # Reset the environement unset $(env | egrep '^(\w+)=(.*)$' | egrep -vw 'PWD|USER|PATH|HOME' | /usr/bin/cut -d= -f1) . /usr/share/ltsp/ltsp_config eval $(getltscfg-cluster -a -l prompt) fi read script args <