SUMMARY pkgask generates empty file

From: David Gosbee (david.gosbee@aus.deuba.com)
Date: Thu May 13 1999 - 17:40:38 CDT


Thanks to those who responded. My problem was as follows:-

> Im confronted with the problem of performing a 'pkgadd' of a product during
> a jumpstart. In particular I need to run pkgadd in non-interactive mode so
that
> the jumpstart can be done un-attended and the responses to install questions
> can be standardised.
> The particular package I am installing does want some manual intervention
during
> the install and according to the pkgadd man page the -r option allows for
> specification of a 'response' file containing the answers to the install
> prompts.
>
> Here is the problem..
>
> The utility 'pkgask' is supposed to perform the install session (or at least
the
> interactive part of the install) and record the answers given in a file so
that
> pkgadd can use this file. Well.... it doesnt - at least not for me. The pkgask
> session seems to run to completion without error but an empty file is
> generated.
>
> Can anyone suggest why pkgask is not generating anything for me.
>
> It is on Solaris 2.6.
> The package happens to be SUNWsbuc (Solstice Backup 5.1 Client)
>
> my command line looks like this :-
>
> pkgask -d . -r /tmp/responsedir SUNWsbuc
>
> and I end up with an empty /tmp/responsedir/SUNWsbuc after running this
command.
>
> Thanks in advance.

SUMMARY:

I had two responses:-

======================================================================
David,

I just tried the same thing on my 2.5.1 system using pkgask and it too
generates an empty file. Looking on Sun Solve, I see a bunch of bug
reports on not being able to use pkgask to install SUNWsbuc (along
with other packages either) non-interactively.

I'm afraid the only solution is going to be writing an expect script
to do what you want. Not really ideal since you need to get expect up
and running.

Maybe if you find a package install the does generate an response
file, you can then customize it to work with SUNWsbuc. I know I'd be
interested in finding something like that!

John
   
=======================================================================
David, if it always asks the same question, and the answer is always the
same, you can do what I do, and use a here-file, like this:

pkgadd whatever <<BLAHBLAH
yes
yes
BLAHBLAH

It will stick two "yes's" onto stdin, answering the questions
automagically!
=========================================================================

Thankyou for those responses. I did something like the second suggestion except
I edited my own 'response' file. I didnt know the format of this file so I just
guessed that all it needed was one line per answer for each question asked
during the pkgadd (in fact the 'request' script in the package).

I then used the -r option to pkgadd to specify my response file and it seemed to
work.

Just an aside: It appears SUNWsbuc package (Solstice Backup 5.1 client - sparc)
behaves a little differently to the previous release of this product (5.0.1) in
that the nsrexecd daemon always requires that the 'save' commands exist in the
same place as the nsrexecd binary.It is documented that nsrexecd can be run with
the '-p savepath' option to specify the directory location of the 'save'
commands when it differs from the default location(same place as nsrexecd). I
found that for 5.1 this doesnt work and I am forced to have them all in the same
directory (or symbolic links to achieve the same).

This only matters when the package is not installed in the default manner
eg putting the binaries on a NFS mount point so many clients can access the
binaries without having to pkgadd on every client (we have 20 to 30 clients).
[this is why I was investigating the pkgadd problem detailed above]

In the end pkgadd is probably the way to go particularly from point of view of
wanting to make install of future patches less complicated.

Thanks again
__________________________
David Gosbee
UNIX Systems Administration
Deutsche Bank
david.gosbee@aus.deuba.com
__________________________



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:19 CDT