Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about pkgask/pkgadd on solaris 10 1

Status
Not open for further replies.

whn

Programmer
Oct 14, 2007
265
US
Hi,

I am trying to do a silent gcc installation on a Solaris 10 box using this command: pkgadd -r response -d .

To get the response file, I used this command: "pkgask -r tt -d .". But I got an error:


Code:
# pkgask -r tt -d ./gcc-3.4.6-sol10-sparc-local

The following packages are available:
  1  SMCgcc     gcc
                (sparc) 3.4.6

[COLOR=blue] Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: [b]1[/b][/color]

Processing package instance <SMCgcc> from </tmp/gcc-3.4.6-sol10-sparc-local>

gcc(sparc) 3.4.6
FSF
[COLOR=red] [b]pkgask: ERROR: package does not contain an interactive request script[/b][/color]

Processing of request script failed.
No changes were made to the system.

I can hardly understand this error message (in red). Isn't the blue section an interactive request? Why can't I put my choice in a reponse file (in this case, file 'tt')?

Thank you in advance for you kind help and explanation!
 
You don't need a response file to answer those standard questions (i.e. questions that are not customised for that particular package).

Simply use an 'admin' file to skip those prompts. I don't have a Solaris box handy right now, but check the pkgadd page, it should be described there.

One that I have used previously for non-interactive installations contained:

[tt]basedir=default
runlevel=quit
conflict=quit
setuid=nocheck
action=quit
partial=quit
instance=unique
idepend=quit
rdepend=quit
space=quit[/tt]

Annihilannic.
 
Thank you, Annihilannic.

Actually, I have tried something similar beffore I posted my question here. I tried your way again, it di not work. :(

 
I have done quiet installs in scripts by using the following:

pkgadd -n -a /Files/Final/pkgrmadmin/admin -d /Files/Final NSCPcom

The admin file:

mail=
instance=unique
partial=ask
runlevel=ask
idepend=nocheck
rdepend=nocheck
space=ask
setuid=ask
conflict=nocheck
action=ask
basedir=default


[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
thank you, Blue.

Before I posted my question, i have tried this way:

============================
mail=
instance=overwrite
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=nocheck
setuid=nocheck
conflict=nocheck
action=nocheck
networktimeout=60
networkretries=3
authentication=quit
keystore=/var/sadm/security
proxy=
basedir=default

refer to: =============================

it did not work. I then tried your way, no luck either. I know I must have missed something simple. I just could not figure out what it is!
 
The only thing I can think of is to make sure of the file modifications and ownership of the admin file and that pkgadd knows where it is.

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Are you remembering to include the package name on the end of the pkgadd command-line, in this case SMCgcc? Otherwise I think it will always prompt you for the package to install. Alternatively you can use the keyword all.

Annihilannic.
 
Yes, you are right, Annihilannic. Thank you so much for your help!

Now, I have a follow-up question.

I need to write am auto installation tool. Therefore, in my tool, it should be able to handle all the questions that pkgadd normally asks. For example, I need to install a package named as EMCpower. For a manual installation, the pkgadd would ask for 4 questions:

1) Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: 1

2) Enter package base directory (default:/opt):

3) Configuration for PowerPath 5.0.x exists - want to upgrade? [y,n,q,?] (default: y):

4) This package contains scripts which will be executed with super-use
permission during the process of installing this package.

Do you want to continue with the installation of <EMCpower> [y,n,?] y

=========================================
So, I use pkgask -r to create a response file:

% pkgask -r tt -d . EMCpower

Processing package instance <EMCpower> from </tmp>

EMC PowerPath(sparc) 5.3.0_b053

Enter package base directory (default:/opt):
Configuration for PowerPath 5.3.x exists - want to upgrade? [y,n,q,?] (default: y):

Response file </tmp/tt> was created.

Processing of request script was successful.

==============================================

As you can see here, the last question is still skipped.

So if I try to install this package again use the response file, it still asks the last question:


% pkgadd -r tt -d . EMCpower

{color:#000000}Processing package instance <EMCpower> from </tmp>

EMC PowerPath(sparc) 5.3.0_b053
EMC Corporation
Using </opt> as the package base directory.
## Processing package information.
## Processing system information.
1 package pathname is already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.


This package contains scripts which will be executed with super-user
permission during the process of installing this package.


Do you want to continue with the installation of <EMCpower> [y,n,?]

===========================================================

How do I solve this problem? Your advice is highly appreciated!!
 
BTW, the reponse file looks like this:

==========================
BASEDIR=/opt
REQ_UPGRADE=1
REQ_UPGRADE_VERSION= 530
REQ_CONTEXT=sparc_solaris
REQ_LOAD_SDK=0
REQ_CLUSTER=0
REQ_MAJOR=0
REQ_INSTALL_DIR=
OSR=5.10
ISA=sparcv9
==========================
 
I finally figured out how to do a silent install!!!

1) Create a resonpse file:

Code:
% pkgask -r a1 -d . EMCpower
%  cat a1
BASEDIR=/opt
REQ_UPGRADE=1
REQ_UPGRADE_VERSION= 530
REQ_CONTEXT=sparc_solaris
REQ_LOAD_SDK=0
REQ_CLUSTER=0
REQ_MAJOR=0
REQ_INSTALL_DIR=
OSR=5.10
ISA=sparcv9
2) Creating a admin file using a template in /var/sadm/install/admin/default. Mine is like this:
Code:
% cat a2
mail=
instance=overwrite
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=nocheck
setuid=nocheck
conflict=nocheck
action=nocheck
networktimeout=60
networkretries=3
authentication=quit
keystore=/var/sadm/security
proxy=
basedir=default
3) Now, it is ready for a silent installation:
Code:
% pkgadd -r a1 -a a2 -d . EMCpower
4) And finally, here is for silent removing:
Code:
% pkgrm -a a2 -n EMCpower
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top