From 233ff4faf1cbee688db89cf8152cc593a3ca6c55 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Mon, 4 Mar 2013 03:03:01 +0000 Subject: [PATCH] defect 3389: support the sles with tightvnc git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15359 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/share/xcat/rvid/rvid.kvm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/xCAT-client/share/xcat/rvid/rvid.kvm b/xCAT-client/share/xcat/rvid/rvid.kvm index 61853f4b5..1c7317e1e 100755 --- a/xCAT-client/share/xcat/rvid/rvid.kvm +++ b/xCAT-client/share/xcat/rvid/rvid.kvm @@ -17,9 +17,16 @@ if [ $rvid_vidproto = "vnc" ];then export VNC_VIA_CMD='/usr/bin/ssh -o BatchMode=yes -f -L "$L":"$H":"$R" "$G" sleep 20' ( flock 200 - echo -e "$rvid_password\n$rvid_password"|vncpasswd /tmp/rvidpass.$$ > /dev/null - #echo $rvid_password|vncviewer :$myport -via $rvid_server AutoSelect=0 FullColor=1 passwdInput=1 >& /dev/null & - vncviewer $rvid_server:$myport AutoSelect=0 FullColor=1 passwd=/tmp/rvidpass.$$ >& /dev/null & + #tightvnc is used for suse, but tigervnc is used for rh + istigervnc=`vncviewer -help 2>&1 | grep -i tigervnc` + if [ "x$istigervnc" == "x" ]; then + vncpasswd.arg /tmp/rvidpass.$$ $rvid_password > /dev/null + vncviewer $rvid_server:$myport -passwd /tmp/rvidpass.$$ >& /dev/null & + else + echo -e "$rvid_password\n$rvid_password"|vncpasswd /tmp/rvidpass.$$ > /dev/null + #echo $rvid_password|vncviewer :$myport -via $rvid_server AutoSelect=0 FullColor=1 passwdInput=1 >& /dev/null & + vncviewer $rvid_server:$myport AutoSelect=0 FullColor=1 passwd=/tmp/rvidpass.$$ >& /dev/null & + fi sleep 2.0 flock -u 200 rm /tmp/rvidpass.$$