Re: [Ltsp-discuss] nc -q unsupported on Fedora/RHEL

2011-06-01 Thread Warren Togami Jr.
On 05/31/2011 11:13 AM, Gideon Romm wrote: > Not to nitpick, but this is faster: > > nc_q_param="-q" > nc_output=`LANG=C nc -q 2>&1` > case "$nc_output" in > *"option requires an argument"*) nc_q_param="-q -1" ;; > *"invalid option -- q "*) unset nc_q_param ;; > *"invalid option -- '

Re: [Ltsp-discuss] nc -q unsupported on Fedora/RHEL

2011-05-31 Thread Gideon Romm
Not to nitpick, but this is faster: nc_q_param="-q" nc_output=`LANG=C nc -q 2>&1` case "$nc_output" in *"option requires an argument"*) nc_q_param="-q -1" ;; *"invalid option -- q "*) unset nc_q_param ;; *"invalid option -- 'q' "*) unset nc_q_param ;; esac unset nc_output -Gadi On T

Re: [Ltsp-discuss] nc -q unsupported on Fedora/RHEL

2011-05-31 Thread Warren Togami Jr.
On 05/24/2011 06:37 AM, David Johnston wrote: > > nc_q_param="-q" > nc_output=`LANG=C nc -q 2>&1` > ( echo $nc_output |grep -q "option requires an argument" ) \ > && nc_q_param="-q -1" > ( echo $nc_output |grep -q "invalid option -- q " ) \ > && nc_q_param=" " > ( echo $nc_output |gre

Re: [Ltsp-discuss] nc -q unsupported on Fedora/RHEL

2011-05-24 Thread David Johnston
On Tue, 2011-05-24 at 09:41 +0300, Alkis Georgopoulos wrote: > Στις 23-05-2011, ημέρα Δευ, και ώρα 12:17 -1000, ο/η Warren Togami Jr. > έγραψε: > > http://hg.fedorahosted.org/hg/virt-manager/rev/1f781890ea4a > > This is a very similar issue. Notice their kludge to detect nc's > > capabilities. >

Re: [Ltsp-discuss] nc -q unsupported on Fedora/RHEL

2011-05-23 Thread Alkis Georgopoulos
Στις 23-05-2011, ημέρα Δευ, και ώρα 12:17 -1000, ο/η Warren Togami Jr. έγραψε: > http://hg.fedorahosted.org/hg/virt-manager/rev/1f781890ea4a > This is a very similar issue. Notice their kludge to detect nc's > capabilities. I'd use something like this instead, in some initialization code like e.

[Ltsp-discuss] nc -q unsupported on Fedora/RHEL

2011-05-23 Thread Warren Togami Jr.
Various scripts rely on nc -q which is an invalid parameter on Fedora and RHEL. Apparently Fedora defaults to the -q behavior. As a result whenever -q is used an ugly error message is printed and nc fails. http://hg.fedorahosted.org/hg/virt-manager/rev/1f781890ea4a This is a very similar issue