summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/appl/kx/tenletxr.in
blob: 5c05dc9d4c9d6dfd6d958a88e459208a0ffce2d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
# $Id: tenletxr.in,v 1.3 1999/02/04 09:29:59 assar Exp $
#
usage="Usage: $0 [-l username] [-k] [-v] [-h | --help] [--version] host [port]"
while true
do
  case $1 in
  -l) kx_args="${kx_args} -l $2"; shift 2;;
  -k) kx_args="${kx_args} -k"; shift;;
  --version) echo "$0: %PACKAGE% %VERSION%"; exit 0;;
  -h) echo $usage; exit 0;;
  --help) echo $usage; exit 0;;
  -v) set -x; shift;;
  -*) echo "$0: Bad option $1"; echo $usage; exit 1;;
  *) break;;
  esac
done
if test $# -lt 1; then
  echo $usage
  exit 1
fi
host=$1
port=$2
bindir=%bindir%
pdc_trams=`dirname $0`
PATH=$pdc_trams:$bindir:$PATH
export PATH
set -- `kx $kx_args $host`
if test $# -ne 3; then
  exit 1
fi
screen=`echo $DISPLAY | sed -ne 's/[^:]*:[0-9]*\(\.[0-9]*\)/\1/p'`
pid=$1
disp=${2}${screen}
auth=$3
env DISPLAY=$disp XAUTHORITY=$auth $SHELL
kill -USR2 $pid
OpenPOWER on IntegriCloud