SUMMARY: Automatically installing packages

Patchet, Chuck SPAWAR patchet at spawar.navy.mil
Thu Apr 1 13:40:37 EST 2004


First off, I appreciate the fast and numerous responses.  Secondly, I
apologize for asking a question that had already been asked in a slightly
different format earlier.  Sadly, time prevented me from a more exhaustive
search.

The best solution was to create an admin file and use the -a option for
pkgadd, and to specify the particular package on the commandline.  Dirk
Hamilton provided the following example, which worked admirably:

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

Another suggestion that worked was to specify the particular package and
keep the << EOF style.

Suggestions for using -r didn't work, as using pkgask to create a response
script told me the package is required to have an interactive request
script, of which it did not.

Suggestions for using -n didn't work, with no change in package behaviour.

Several people suggested using Expect, however my particular project
prevents me from adding any "unapproved" software, even that generally
acknowledged as benign.

cheers,
Chuck

> Hello Gurus,
>
> I'm trying to script some automatic package installations on Solaris 8 and
I
> ran across the following (to me at least) bizarre behaviour:
>
> - If I add the pkgadd manually, and answer the questions interactively,
> everything works.  For example:
>   # pkgadd -d /tmp/ANTRagex.pkg
>     When asked which packages, I type: all
>     When asked if I consent to running scripts with root permissions, I
> answer: y
>     Package installs correctly.
>
> - So, I now know that 'all' and 'y' are the answers I need.  Being
> interested in automating this, I remove the package and attempt the
> following:
>   # pkgadd -d /tmp/ANTRagex.pkg << EOF
>   > all
>   > y
>   > EOF
>
> However, this bombs.  The install appears to go fine until the second
> question (asking about root consent) after which I am told simply:
> Installation of <ANTRgex> failed.
>
> Am I missing some subtlety of pkgadd?  Am I using some poor scripting?  Am
I
> simply an idiot?  Is it too near quitting time?
>
> Appreciate any and all responses, will summarize.


Chuck Patchet 24221 (PL-SS 600)
SPAWARSYSCEN
53560 Hull St.
San Diego, CA 92152-5001
619.553.5321 Lab 250C
patchet at spawar.navy.mil



More information about the sunmanagers mailing list