1

I'm trying to do a pkgadd on Solaris with non-interactive. Somehow pkgadd -d /home/mypackage -n doesn't work. While reading the man page, I found out that i can disable interaction by using admin file. So i followed the guideline here. When i tried to run pkgadd -d /home/mypackage -a /home/admin it still prompt for user input.

*I create the admin file at /home/

This is the display:

The following packages are available:
 1  mypackage    mypackage
                 (all) 4.4.0

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

Google then lead me to this site. By improving a bit, I manage to make it run with the command pkgadd -d /home/mypackage -a /home/admin 'all'

Since pkgadd can be done, I assume pkgrm should be the same as well. So I tried pkgrm -a /home/admin mypackage.

Then a prompt appear.

The following package is currently installed:
   mypackage   mypackage
               (all) 4.4.0

Do you want to remove this package? [y,n,?,q]

Then I thought maybe its just the same problem as pkgadd. So I tried pkgrm -a /home/admin 'y' mypackage. Instead it gave me an error.

pkgrm: ERROR: no package associated with <y>

What is it exactly that I should pass so that I can do pkgrm non-interactively. Should i add another parameter inside the admin file? If so, what is the parameter? This is the parameter that I have tried using:

remove=nocheck
removal=nocheck
confirm=nocheck

All these tries cause a WARNING: unknown admin parameter

This is the admin file that I use:

 mail=
 instance=nocheck
 partial=nocheck
 runlevel=nocheck
 idepend=nocheck
 space=nocheck
 setuid=nocheck
 conflict=nocheck
 authentication=nocheck
 action=nocheck
 rscriptalt=root
 bsedir=default

I am using Solaris 10 i386

1

2 Answers 2

2

Found a hint here. I tried to apply the command with -n and it works!! The command should finally be pkgrm -n -a /export/home/admin mypackage

1

For removing a package without asking for dependency, if you are okay, you can include

rdepend=nocheck

in the admin file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .