Operating System - HP-UX
1834938 Members
2400 Online
110071 Solutions
New Discussion

Re: Getting software information

 
Alex Lavrov
Regular Advisor

Getting software information

Hello,
I have a script that installs software, using swinstall. Now I want, that it will print if reboot is needed before the installation. in swinstall GUI, I can see it in software description, I tried to receive this info in line mode, but failed.
Is there any way to get this info with swlist? swinstall?

thank you!
5 REPLIES 5
Michael Steele_2
Honored Contributor

Re: Getting software information

Why don't you build your script using the interactive session and pipe in the keyboard answers, like a macro, with "here docs".

swinstall <input line
input line
EOF

Test for the confirmation before software requiring a reboot prompt.

The window will pop up and you'll see it.

-or-

You can grep the swinstall.log for reboot needed.

-or-

The autoreboot swinstall parameter will stop any reboot if set to false, then grep the logs for reboot needed and reboot from the script.

autoreboot=false
(Applies only to swinstall.) Prevents the installation of software requiring a reboot from the non-interactive interface. If set to true, this software can be installed and the target system(s) will be automatically rebooted.

An interactive session always asks for confirmation before software requiring a reboot is installed.

Support Fatherhood - Stop Family Law
Alex Lavrov
Regular Advisor

Re: Getting software information

Hey,
it's the point, that I don't want to sit and answer the questions, I just mark the software I want and it installs is, but I want to see a message in capital lettres if this software requires reboot.
I just don't know how to fetch this information, from swlist or maybe swinstall ...
I tried to use "-a description" in swlist, but it's too short and do not gives me the whole info about this software.
curt larson_1
Honored Contributor

Re: Getting software information

do a swlist with -a is_reboot such as swlist -l patch -a is_reboot will list all your patches and weather a reboot is required.
Bill Hassell
Honored Contributor

Re: Getting software information

swinstall can be run completely from the command line and you can add -x autoreboot=true which tells swinstall to build the kernel and reboot automnatically if needed. When you use the interactive mode (incomplete or no items on the swinstall command line), the program assumes you want every step to be interactive including kernel building and reboot.


Bill Hassell, sysadmin
Michael Steele_2
Honored Contributor

Re: Getting software information

Alex:

With here-documents you don't have to be there.
Support Fatherhood - Stop Family Law