We help IT Professionals succeed at work.
Get Started

Script/ways to automate pkgadd which prompts for  y / yes / all

1,179 Views
Last Modified: 2015-11-11
I have hundreds of Solaris 10 VMs which I need to do "pkgrm" & "pkgadd"
& I could issue these commands centrally from a central location instead
of login one by one which makes it much faster for me.

However, the commands won't work if being prompted for inputs
like y or yes or all as shown below.  Is there any option to pkgrm &
pkgadd so that it doesn't prompt for these?

If not, appreciate some sort of scripts (but not Expect TCL script as I'm
not allowed to install these; besides I cant find Expect TCL pkg for
Solaris x86) to facilitate this will be nice:
 
===========================================

# pkgadd -d ./Agent-_5.10_US-9.0.0-9000.x86_64.pkg

The following packages are available:
  1  ms-agent     MicroFocus Agent
                  (x86_64) 9.0.0-9000

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

Processing package instance <ms-agent> from </var/tmp/Agent-Solaris_5.10_US-9.0.
0-9000.x86_64.pkg>

MicroFocus MSSS Agent(x86_64) 9.0.0-5000
Copyright (c) 2004-2012 MicroFocus Inc.
All rights reserved.
## Executing checkinstall script.
Using </> as the package base directory.
## Processing package information.
## Processing system information.
   8 package pathnames are already properly installed.
## Verifying package dependencies.
## 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 <ms-agent> [y,n,?] y

Installing MicroFocus MSSS Agent as <ms-agent>

## Executing preinstall script.
## Installing part 1 of 1.
...

## Executing postinstall script.

Installation of <ms-agent> was successful.
Comment
Watch Question
Owner
Commented:
This problem has been solved!
Unlock 2 Answers and 16 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE