2008-12-11 19:37:14 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
2009-04-10 14:09:03 +00:00
|
|
|
if [ ! -z $rvid_virturi -a ! -z $rvid_virtname ]; then
|
|
|
|
if [ -x /usr/bin/virt-viewer ]; then
|
|
|
|
exec /usr/bin/virt-viewer -c $rvid_virturi $rvid_virtname
|
|
|
|
else
|
|
|
|
echo "Installation of virt-viewer is recommended, falling back to vncviewer"
|
|
|
|
fi
|
|
|
|
fi
|
2008-12-11 19:37:14 +00:00
|
|
|
myport=${rvid_vncdisplay#*:}
|
|
|
|
let myport=myport-5900;
|
2009-03-14 00:40:38 +00:00
|
|
|
export VNC_VIA_CMD='/usr/bin/ssh -o BatchMode=yes -f -L "$L":"$H":"$R" "$G" sleep 20'
|
2009-03-14 01:44:52 +00:00
|
|
|
(
|
|
|
|
flock 200
|
|
|
|
vncviewer :$myport -via $rvid_server AutoSelect=0 FullColor=1 >& /dev/null &
|
|
|
|
sleep 0.2
|
|
|
|
flock -u 200
|
|
|
|
) 200> /tmp/xcat/virtvnclock
|
|
|
|
|