[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [et-mgmt-tools] [PATCH] Use netcat if found



On Monday 01 December 2008 16:26:48 Daniel P. Berrange wrote:
> Finally the patch is wrong because its doing
>
> +            if os.path.exists('/usr/bin/netcat'):
> +                netcat = "netcat"
>
> which is in the context of the machine virt-manager is running on, which
> is totally bogus when connecting to a remote machine.
>

Hi,

sorry forgot to send the fixed patch.


See the attached file :)


	-- andreas
Index: virt-manager-0.6.1/src/virtManager/details.py
===================================================================
--- virt-manager-0.6.1.orig/src/virtManager/details.py
+++ virt-manager-0.6.1/src/virtManager/details.py
@@ -1172,7 +1172,13 @@ class vmmDetails(gobject.GObject):
             argv = ["ssh", "ssh", "-p", sshport]
             if username:
                 argv += ['-l', username]
-            argv += [ server, "nc", vncaddr, str(vncport) ]
+            if os.path.exists('/usr/bin/nc'):
+                netcat = "/usr/bin/nc"
+            elif os.path.exists('/usr/bin/netcat'):
+                netcat = "/usr/bin/netcat"
+            else:
+                return
+            argv += [ server, netcat, vncaddr, str(vncport) ]
             os.execlp(*argv)
             os._exit(1)
         else:

Attachment: signature.asc
Description: This is a digitally signed message part.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]