[PATCH] Use netcat if found

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

 



Hi,

attached is a patch for virt-manager to use the netcat binary instead of nc if 
it is found.


Cheers,


	-- andreas

-- 
Andreas Schneider, SUSE Labs, http://www.suse.de/
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
Index: virt-manager-0.6.0/src/virtManager/details.py
===================================================================
--- virt-manager-0.6.0.orig/src/virtManager/details.py
+++ virt-manager-0.6.0/src/virtManager/details.py
@@ -1066,7 +1066,10 @@ class vmmDetails(gobject.GObject):
             argv = ["ssh", "ssh", "-p", sshport]
             if username:
                 argv += ['-l', username]
-            argv += [ server, "nc", vncaddr, str(vncport) ]
+            netcat = "nc"
+            if os.path.exists('/usr/bin/netcat'):
+                netcat = "netcat"
+            argv += [ server, netcat, vncaddr, str(vncport) ]
             os.execlp(*argv)
             os._exit(1)
         else:

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

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux