Operating System - HP-UX
1832604 Members
2312 Online
110043 Solutions
New Discussion

Re: swpackage - print message during swinstall

 
SOLVED
Go to solution
Chad Florian
Frequent Advisor

swpackage - print message during swinstall

How can I get a message to print during swinstall of a package I've created with swpackage?.. I'd like to print some info during or after the install for the user to see...
11 REPLIES 11
Bill Hassell
Honored Contributor

Re: swpackage - print message during swinstall

There is no option for printing in swinstall so the user would have to pipe everything to lp and the desired printer name:

swinstall -s /pathname/xyz.depot \* 2>&1 | lp -dsomeprinter

Thw 2>&1 makes sure that error messages are sent to stdout.


Bill Hassell, sysadmin
Chad Florian
Frequent Advisor

Re: swpackage - print message during swinstall

When I say "print", I don't mean lp, I mean stdout or stderror... Anything I print in a control script goes to the swinstall log, but not to the users terminal...
James R. Ferguson
Acclaimed Contributor

Re: swpackage - print message during swinstall

Hi Chad:

The SD tools ('swinstall', 'swremove', etc.) log their activity's in various logs in '/var/adm/sw'. You can fetch what you want from there.

You can also examine the last activity as looged in your '.sw/sessions' directory, such as '$HOME/.sw/sessions/swinstall.last'.

Regards!

...JRF...
f. halili
Trusted Contributor

Re: swpackage - print message during swinstall

Check these logs in /var/adm/sw:
swagent.log
swinstall.log
swagentd.log


Cheers,
f. halili
derekh
Chad Florian
Frequent Advisor

Re: swpackage - print message during swinstall

Yes.. I get that... But most users will just see the swinstall was successful and not check the logs... I want to give the user a message about the package after the install. One that they can't miss or have to look in a log for...
Robert-Jan Goossens
Honored Contributor

Re: swpackage - print message during swinstall

Hi Chad,

How about using the script command?

# script -a /tmp/swinstall_txt
# swinstall ......
# exit
script done on Wed Jun 14 17:33:36 2006

# lp /tmp/swinstall_txt

Regards,
Robert-Jan
James R. Ferguson
Acclaimed Contributor

Re: swpackage - print message during swinstall

Hi (again) Chad:

As you indicated, most users don't want to check the logs...

Fine.

Create a simple wrapper script that passes the arguments passed to it to 'swinstall'. Then, following installation, parse the text that you want form the session ".last" log and present that to the user.

Regards!

...JRF...

Phillip Thayer
Esteemed Contributor

Re: swpackage - print message during swinstall

In another post on swinstall I saw a reference to a %pre and %post (or something to that nature) where you could put sh statements in the section and they would be executed either before or after an install. Is that there? If so could this be something that could be used for this purpose?

Phil
Once it's in production it's all bugs after that.
Chad Florian
Frequent Advisor

Re: swpackage - print message during swinstall

This package is for global distribution from a central depot... So a wrapper script is not an option. I need something built into the SD packaging / install process...

Any more ideas?
George Morrison
Frequent Advisor
Solution

Re: swpackage - print message during swinstall

Chad I think I understand what you want - kind of a splash screen message.

You can specify preinstall and postinstall scripts in your psf file, but the output of these scripts go to the swagent.log, which you have made clear is not what you want. You might check out swask, which is "the" way for a back-end script to communicate with the front-end swinstall. I am not very familar with it but I think if that won't work then you are out of luck.

Good luck!
Chad Florian
Frequent Advisor

Re: swpackage - print message during swinstall

Thanks! That looks like what I'm looking for.... Now I just have to figure out how to use it. Can't find much documentation that isn't as cryptic as the man page...