SUMMARY: Automatically installing packages

From: Patchet, Chuck SPAWAR (patchet@spawar.navy.mil)
Date: Thu Apr 01 2004 - 13:40:37 EST


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@spawar.navy.mil
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:28:23 EDT