6505c36ecc
virtman-netstats-fix.diff virtman-finish-button-fix.diff virtman-shutoff-fix.diff virtman-set-has-window-fix.diff virtman-grep-fix.diff virtman-no-cd-present-fix.diff virtman-resize-menu-fix.diff virtman-vcpu-count-fix.diff virtman-storage-pool-fix.diff virtman-domain-name-fix.diff virtman-unapplied-changes-fix.diff virtman-details-fix.diff virtman-delete-fix.diff virtman-collidelist-fix.diff virtman-char-device-mode-fix.diff virtinst-hv-version-fix.diff virtinst-initrd-inject-fix.diff virtinst-initrd-inject2-fix.diff virtinst-no-volume-fix.diff virtinst-prompts-fix.diff virtinst-cpu-model-name-fix.diff virtinst-xml-clear-fix.diff virtinst-remote-storage-fix.diff virtinst-error-message-fix.diff virtinst-typo-fix.diff virtinst-cdrom.diff virtinst-storage-ocfs2.diff OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=63
32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
|
|
Subject: grep -q Portability
|
|
From: Richard Laager rlaager@wiktel.com Mon Aug 8 15:42:18 2011 -0500
|
|
Date: Tue Aug 9 11:33:31 2011 -0400:
|
|
Git: d078def94fda124304da95733d41844384e739ad
|
|
|
|
I don't think I've sent this one to the list yet.
|
|
|
|
The nc -q autodetection code fails if the target system's grep does not
|
|
have a -q argument (quite the ironic coincidence). I believe -q is
|
|
specified by POSIX, but Solaris 11's /bin/grep does not support -q.
|
|
Redirecting to /dev/null works portably. (In fact, this is even
|
|
recommended in favor of -q for portability by GNU grep's man page.)
|
|
|
|
This needs to be changed in virt-manager's src/virtManager/console.py.
|
|
|
|
Richard
|
|
|
|
Index: virt-manager-0.9.0/src/virtManager/console.py
|
|
===================================================================
|
|
--- virt-manager-0.9.0.orig/src/virtManager/console.py
|
|
+++ virt-manager-0.9.0/src/virtManager/console.py
|
|
@@ -93,7 +93,7 @@ class Tunnel(object):
|
|
nc_params = "%s %s" % (gaddr, gport)
|
|
|
|
nc_cmd = (
|
|
- """nc -q 2>&1 | grep -q "requires an argument";"""
|
|
+ """nc -q 2>&1 | grep "requires an argument" >/dev/null;"""
|
|
"""if [ $? -eq 0 ] ; then"""
|
|
""" CMD="nc -q 0 %(nc_params)s";"""
|
|
"""else"""
|