pcp
[Top] [All Lists]

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

To: Nathan Scott <nathans@xxxxxxxxxx>
Subject: Re: [pcp] qa - use of read when pipelining sudo command
From: Tomas Dohnalek <tdohnale@xxxxxxxxxx>
Date: Thu, 04 Oct 2012 11:53:39 +0200
Cc: pcp@xxxxxxxxxxx
In-reply-to: <1906792841.6784843.1349343881135.JavaMail.root@xxxxxxxxxx>
References: <1906792841.6784843.1349343881135.JavaMail.root@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1
Dne 4.10.2012 11:44, Nathan Scott napsal(a):

----- Original Message -----
Hi,
in the beginning I would like to show the way I am running
test-cases.

# scl enable devtoolset-1.1 bash
(are you root at this point?)

sure


# su -c "./check 110" pcpqa

FWIW, I tend to do:

$ sudo su - pcpqa
$ ./check ...

I know, but this is a script, so I cant use `su pcpqa` and I have many test-cases on blacklist so far, so it is iterating over all local tests what aren't on blacklist and each of them running like

# su -c "./check $test_case" pcpqa
(seems correct to me)



This indicates to me, that the "both, daemon, socket" didn't "get
through" to sudo Install command.
It looks a bit like its closing stdin at some point, and the piped
in text is being dropped on the floor.  Not sure where/why though.

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?

Its a wierd one, not really sure, sorry.

cheers.

--
Nathan

Too bad. Thanks anyway
Tomas

--
Tomas Dohnalek
QE Tools Intern
Red Hat

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