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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do i create a non interactive package?

Status
Not open for further replies.

keshavprabhu

Technical User
Aug 20, 2003
10
0
0
US
What are the steps to create a non-interactive package. The requirement is to have a pkgadd which runs without taking any responses.

Rgds,
- Keshav.
 
Hi,

After creating an interactive package, use pkgask to store the responses to the questions in a file. Then you can use pkgadd -r responsefile to install the package without having to manually respond to the questions.

This is documented in the manpages for pkgadd and pkgask.

-Joe
 
Hi,

Thanks for the same! I tried to do it, it says though that a request script is required. What do I have to put in that request script? If i create a blank request script, then the response file is create of 0 bytes.

Rgds,
- Keshav.
 
Hi,

I'm not sure that I understand your question. What did you have a problem with, pkgask or pkgadd?

You must first use pkgask to create the response file:
pkgask -r nameOfFileToCreate pkgName
This will cause the package to ask the questions asked during package installation and will store your responses in "nameOfFileToCreat".

Then use:
pkgadd -r "NameOfResponseFile" PkgName

pkgadd will look in the response file to for the response to the questions asked during installation of the package.

This can all be done in a script and we use it extensively during unattended JumpStart installs.

-Joe

 
Hi Joe,
pkgask -r nameOfFileToCreate pkgName

&quot;Processing package instance <pkgName> from </home/test>

pkgName package Sun SPARC Platforms
(UltraSparc PCI) 1.0

Response file </home/test/nameOfFileToCreate > was created.

Processing of request script was successful.&quot;

However, this nameOfFileToCreate file is of 0 bytes, so i cannot use it with pkgadd.

Rgds,
- Keshav.
 
Hi,

Another way to do it is to start script before adding the package using pkgadd, and then editing the resulting text file to contain only your responses and then youse this newly created file as a response file to pkgadd -r.

-Joe
 
Keshav do you have any prompts for input in the request file? The response file should only contain answers to any questions or prompts for information in the request file.
 
Hi,

Let me try and make the requirement statement that I have -

I have a set of packages to be installed. Usually, these packages are installed using pkgadd. I want to install these packages using GUI. So, I wrote a script to call pkgadd for each of the packages. but when i run my script, the packages ask -

&quot;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 <pkgName> [y,n,?] &quot;

This I do not want. The package SHOULD be installed without ANY interaction. &quot;Do you want to continue&quot; types cannot be handled thru the request/response scripts as far as I know.

Please help.

Rgds,
- Keshav.
 
Hi,

&quot;Do you want to continue&quot; types are handled fine thru the request/response scripts. We have been doing this for years.

-Joe
 
There are 2 sides to fully automating a package install - one is the use of pkgask and the response files it generates (as noted above).

The other side is the use of an admin file (i.e. pkgadd -a <admin file> <pkg>

man -s4 admin to see the full details. The following in the admin file should allow for totally unattended pkgadd's
===
mail=
instance=overwrite
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=nocheck
setuid=nocheck
conflict=nocheck
action=nocheck
basedir=default
===
HOWEVER, before you use this file, make sure you understand from the man page what each section does. It disable checks for scripts running as superuser, space constraints, previous installs, conclicts, etc, so it can be destructive if yuo are not careful....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top