pcp
[Top] [All Lists]

[pcp] qa - use of read when pipelining sudo command

To: pcp@xxxxxxxxxxx
Subject: [pcp] qa - use of read when pipelining sudo command
From: Tomas Dohnalek <tdohnale@xxxxxxxxxx>
Date: Thu, 04 Oct 2012 11:16:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1
Hi,
in the beginning I would like to show the way I am running test-cases.

# scl enable devtoolset-1.1 bash
# su -c "./check 110" pcpqa

in many test-cases (e. g. 110) there is a structure similar to:

echo 'both
daemon
socket' | $sudo ./Install -e >>$tmp.out 2>&1

which is from strange reason not working to me when running DTS-pcp on RHELs. I 
got results like:

 Please enter c(ollector) or m(onitor) or b(oth) [b] both
< Install simple as a daemon or dso agent? [daemon] daemon
< PMCD should communicate with the simple daemon via a pipe or a socket? [pipe] 
socket
< Use Internet or Unix domain sockets? [Internet] Unix
< Unix FIFO name? TMP.fifo-1
---
> Please enter c(ollector) or m(onitor) or b(oth) [b]
> Install simple as a daemon or dso agent? [daemon]
> PMCD should communicate with the simple daemon via a pipe or a socket? [pipe]

This indicates to me, that the "both, daemon, socket" didn't "get through" to sudo Install command. If I rewrite it this way

$sudo "echo 'both
daemon
socket' | ./Install -e" >>$tmp.out 2>&1

It's working then. Any suggestions what is wrong?

Thanks
Tomas

--
Tomas Dohnalek
QE Tools Intern
Red Hat

<Prev in Thread] Current Thread [Next in Thread>