> It is hackery because you are placing special behaviour into how input
> is read from stdin for the sole purpose of supporting a deficiency in
> the design of the program.
What is the deficiency in the design of the "pkgrm" program?
I don't suggest to change its interface, because I don't see h
Nikolay Molchanov writes:
> I'm not suggesting to change stdio, I'm suggesting to change pkgrm code to
> use
> "read(0, buf, 1);"
Don't forget that pkgadd and pkgrm exec many other programs (as part
of the scripting interfaces, among other reasons), none of which will
have your special changes.
On 31/10/2007, Nikolay Molchanov <[EMAIL PROTECTED]> wrote:
>
> Shawn Walker wrote:
> On 31/10/2007, Nikolay Molchanov <[EMAIL PROTECTED]> wrote:
>
>
> I'm not suggesting to change stdio, I'm suggesting to change pkgrm code to
> use
> "read(0, buf, 1);"
> in loop to read 1 byte from standard inp
Shawn Walker wrote:
On 31/10/2007, Nikolay Molchanov <[EMAIL PROTECTED]> wrote:
I'm not suggesting to change stdio, I'm suggesting to change pkgrm code to use
"read(0, buf, 1);"
in loop to read 1 byte from standard input until the end of line or EOF happens.
Basically it is the same loop as i
On Wed, 31 Oct 2007, Shawn Walker wrote:
> On 31/10/2007, Nikolay Molchanov <[EMAIL PROTECTED]> wrote:
>> I'm not suggesting to change stdio, I'm suggesting to change pkgrm code to
>> use
>> "read(0, buf, 1);"
>> in loop to read 1 byte from standard input until the end of line or EOF
>> happens.
On 10/31/07, Nikolay Molchanov <[EMAIL PROTECTED]> wrote:
> I'm not suggesting to change stdio, I'm suggesting to change pkgrm code to use
> "read(0, buf, 1);"
> in loop to read 1 byte from standard input until the end of line or EOF
> happens.
> Basically it is the same loop as it uses to write i
On 31/10/2007, Nikolay Molchanov <[EMAIL PROTECTED]> wrote:
> I'm not suggesting to change stdio, I'm suggesting to change pkgrm code to use
> "read(0, buf, 1);"
> in loop to read 1 byte from standard input until the end of line or EOF
> happens.
> Basically it is the same loop as it uses to write
I'm not suggesting to change stdio, I'm suggesting to change pkgrm code to use
"read(0, buf, 1);"
in loop to read 1 byte from standard input until the end of line or EOF
happens.
Basically it is the same loop as it uses to write its questions:
12580:write(2, " D", 1)= 1
1258
Jennifer Pioch wrote:
On 10/31/07, Nikolay Molchanov <[EMAIL PROTECTED]> wrote:
Thank you very much, guys, for giving this example:
% yes | pkgrm ...
It really works! But it is absolutely not understandable why a standard Unix
solution
does not work:
% echo "y" | echo "y" | pkgrm ...
On 10/31/07, Nikolay Molchanov <[EMAIL PROTECTED]> wrote:
> Thank you very much, guys, for giving this example:
>
> % yes | pkgrm ...
>
> It really works! But it is absolutely not understandable why a standard Unix
> solution
> does not work:
>
> % echo "y" | echo "y" | pkgrm ...
The pipe is wron
Nikolay Molchanov writes:
> 12580:read(0, " y\n y\n", 4096) = 4
[...]
> 12585:read(0, 0x080FC1E4, 4096) = 0
>
> Obviously at this moment there is no way to get "y" from the input file.
> A suggested fix is to read only one line in /usr/sb
>Quoting Nikolay Molchanov <[EMAIL PROTECTED]>:
>
>> I tried another way to pass 2 "y" replies:
>>
>> rm -f /tmp/yes.txt
>> touch /tmp/yes.txt
>> echo "y" >> /tmp/yes.txt
>> echo "y" >> /tmp/yes.txt
>> cat /tmp/yes.txt | pkgrm SPROprfnx
>
>Also you can try -
> printf "y\ny\n" | pkgrm SPROprfnx
Good idea! Unfortunately it also does not work, and I suspect the root of the
problem
is a bug in /usr/sbin/pkgrm command. Here is the output:
# printf "y\ny\n"
y
y
# printf "y\ny\n" | pkgrm SPROprfnx
The following package is currently installed:
SPROprfnx Sun Studio 12 Non-ship 64-bit com
Quoting Nikolay Molchanov <[EMAIL PROTECTED]>:
> I tried another way to pass 2 "y" replies:
>
> rm -f /tmp/yes.txt
> touch /tmp/yes.txt
> echo "y" >> /tmp/yes.txt
> echo "y" >> /tmp/yes.txt
> cat /tmp/yes.txt | pkgrm SPROprfnx
Also you can try -
printf "y\ny\n" | pkgrm SPROprfnx
Doug
_
I tried another way to pass 2 "y" replies:
rm -f /tmp/yes.txt
touch /tmp/yes.txt
echo "y" >> /tmp/yes.txt
echo "y" >> /tmp/yes.txt
cat /tmp/yes.txt | pkgrm SPROprfnx
And it also does not work. It reads fisrt "y", but ignores the second "y".
At the same time /usr/sbin/pkgadd works just fine. It al
On 10/30/07, Nikolay Molchanov <[EMAIL PROTECTED]> wrote:
> Thank you very much, guys, for giving this example:
>
> % yes | pkgrm ...
>
> It really works! But it is absolutely not understandable why a standard Unix
> solution
> does not work:
>
> % echo "y" | echo "y" | pkgrm ...
>
> What is inter
Using the admin script is great for pkgadd / pkgrm for jumpstart & kickstart
and automated updates via scripts, A lot of venders have not kept up with this
, here is man entry note form zoneadm:
"The act of installing a new non-global zone is a fresh ins-
tallation of the Solaris op
Thank you very much, guys, for giving this example:
% yes | pkgrm ...
It really works! But it is absolutely not understandable why a standard Unix
solution
does not work:
% echo "y" | echo "y" | pkgrm ...
What is interesting, the first "y" works, but the second "y" does not. Why? Is
it a bug?
> However, I am just fortunate that all the answers to
> the pkgadd/pkgrm prompts are yes, apparently, a
> better way is to use [b]pkgask[/b] to prepare all the
> yes/no answers in a file for package installation and
> removal.
>
> I successfully created one, [b]install_rsp100.[/b]
For what it's
> Using an admin file works! Here is my admin file
> which is in the same directory as package file:
Yes, but not always. There are certain scenarios where pkg* tools will either
exit, or still want to interact even if the admin file instructs not to do so.
The best way is to combine the admin f
This type of questions are controlled by admin file. Just create one and try
pkgadd -a your_admin_file -r install_rsp100 -d qla_D100.i386 QLA
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolari
Using an admin file works! Here is my admin file which is in the same directory
as package file:
#cat admin
mail=
instance=unique
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=nocheck
conflict=nocheck
setuid=nocheck
action=nocheck
basedir=default
To add package:
pkgadd -
Thanks everybody for helping me!
The easiest solution is :
yes | pkgadd -d qla_D100.i386 QLA
yes | pkgrm QLA
(where qla_D100.i386 is the package file name and QLA is the package instance
name)
However, I am just fortunate that all the answers to the pkgadd/pkgrm prompts
are yes, apparently,
You can use pkgask
Tom Chen wrote:
> Hello,
>
> The default pkgadd/pkgrm work in interactive mode and there are multiple
> prompts to answer. How do I write a shell script to answer all these prompts
> automatically?
>
> I googled and tried the following,
> pkgrm -n mypkg and
> pkgrm mypkg < y
# yes | pkgrm
-a
On 10/10/07, Tom Chen <[EMAIL PROTECTED]> wrote:
> sorry, the second method is
> [b]echo y | echo y | pfexec pkgrm mypkg[/b] , assuming that [b]pkgrm[/b]
> requires two prompts and the answer is [b]y[/b] for both. However, it looks
> like only one y is accepted .
>
>
> This me
Hello Tom,
-n will stop if interaction is needed. Instead of echoing y's into
pkgrm use admin file.
pkgrm:
http://docs.sun.com/app/docs/doc/816-5166/pkgrm-1m?l=en&a=view
admin file:
http://docs.sun.com/app/docs/doc/816-5174/6mbb98uc9?l=en&a=view
Cheers,
Jan
On 11.10.2007, at 0:44, Sherry Moo
Or you could just use the "-n" option.
Sherry
On Wed, Oct 10, 2007 at 03:35:28PM -0700, Tom Chen wrote:
> Hello,
>
> The default pkgadd/pkgrm work in interactive mode and there are multiple
> prompts to answer. How do I write a shell script to answer all these prompts
> automatically?
>
> I
sorry, the second method is
[b]echo y | echo y | pfexec pkgrm mypkg[/b] , assuming that [b]pkgrm[/b]
requires two prompts and the answer is [b]y[/b] for both. However, it looks
like only one y is accepted .
This message posted from opensolaris.org
Hello,
The default pkgadd/pkgrm work in interactive mode and there are multiple
prompts to answer. How do I write a shell script to answer all these prompts
automatically?
I googled and tried the following,
pkgrm -n mypkg and
pkgrm mypkg <
29 matches
Mail list logo