Re: silent install with swinstall (292 Views)
Reply
Advisor
alert0919
Posts: 27
Registered: ‎06-03-2009
Message 1 of 22 (292 Views)

silent install with swinstall


I want to install a depot file with
swinstall

but without GUI or any interactive

how could I do tit
Please use plain text.
Honored Contributor
Sajjad Sahir
Posts: 1,277
Registered: ‎12-07-2007
Message 2 of 22 (292 Views)

Re: silent install with swinstall

Dear Alert

swinstall -s with fullpath

thanks and regards

Sajjad Sahir
Please use plain text.
Honored Contributor
Michal Kapalka (mikap)
Posts: 2,683
Registered: ‎08-19-2007
Message 3 of 22 (292 Views)

Re: silent install with swinstall

Hi,

if you have set x-forwarding.

(unset DISPLAY; swinstall -s /path_to/depot )

mikap
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,759
Registered: ‎03-06-2006
Message 4 of 22 (292 Views)

Re: silent install with swinstall

>Sajjad: swinstall -s with fullpath

You need to add \* or the product to the end:
swinstall -s with-fullpath \*
Please use plain text.
Regular Advisor
Anoop P_2
Posts: 91
Registered: ‎01-21-2004
Message 5 of 22 (292 Views)

Re: silent install with swinstall

Here is the command to install all products/patches from a depot on another system and that does not need a reboot:

#swinstall -s depothostname:/depot/path \*

If the installation of any of the products will need a reboot then you must allow it by:

#swinstall -x autoreboot=true -s depothostname:/depot/path \*

If the depot is on the same system, you can remove the depothostname part above.

If you want to install a specific product from the depot:

#swinstall -s depothostname:/depot/path productname

#man swinstall will give you various other options too.
Please use plain text.
Advisor
alert0919
Posts: 27
Registered: ‎06-03-2009
Message 6 of 22 (292 Views)

Re: silent install with swinstall

maybe i describe clear

I would like to use swinstall to install my depot file

when I use swinstall -s fullpath
only select source file no GUI
it will enter GUI interface to analysis file
but I would like it.

I would like to use swinstall to install my depot file without any GUI interface or unattended

what the command is

thanks
Please use plain text.
Regular Advisor
Anoop P_2
Posts: 91
Registered: ‎01-21-2004
Message 7 of 22 (292 Views)

Re: silent install with swinstall

Hello alert0919,

The GUI starts because a selection is not made. Please look at the "\*" at the end.

swinstall -s depothostname:/depot/path \*

will NOT take you to GUI, but will install the product.

Send me the server name/depot path if you want the exact command.


Please use plain text.
Advisor
alert0919
Posts: 27
Registered: ‎06-03-2009
Message 8 of 22 (292 Views)

Re: silent install with swinstall

thanks for all responese
it can work.

I have another question if
I use swremove to remove my application
it only remove some file ,not all file
Question1
it could remove all file and that I create
directory ,could I remove all include that directory I creataed.
it needed another script or swremove command it could did ?
question2
does swremove it also could silent remove
what the command is ?



Please use plain text.
Honored Contributor
Michal Kapalka (mikap)
Posts: 2,683
Registered: ‎08-19-2007
Message 9 of 22 (292 Views)

Re: silent install with swinstall

hi,

swremove ( and product names that you would like to remove )

for example :

swremove IGNITE .....

mikap
Please use plain text.
Regular Advisor
Anoop P_2
Posts: 91
Registered: ‎01-21-2004
Message 10 of 22 (292 Views)

Re: silent install with swinstall

swremove will usually remove all files it installed at the first place.

#swlist -l file -s depothostname:/depot/path product

will list the files included in the product/file set. swlist will remove all of these.

Any directory you created will not automatically be removed. You'll have to remove it.

Yes swremove can also be silent by using the follwing:

swremove product
Please use plain text.
Honored Contributor
Bill Hassell
Posts: 14,178
Registered: ‎05-29-2000
Message 11 of 22 (292 Views)

Re: silent install with swinstall

> it only remove some file ,not all file

This is part of the depot package. A well written package will remove all the necessary files -- but config files and custom files (typically in /var/opt or similar temp directories) are usually not part of the package.
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,759
Registered: ‎03-06-2006
Message 12 of 22 (292 Views)

Re: silent install with swinstall

>Anoop: Any directory you created will not automatically be removed. You'll have to remove it.

Right. This can be done in a postremove control script.
Please use plain text.
Advisor
alert0919
Posts: 27
Registered: ‎06-03-2009
Message 13 of 22 (292 Views)

Re: silent install with swinstall

Right. This can be done in a postremove control script.

I write a script add to postremove

scripts content is
each "test"

but it can't work when I use swremove
does i have something to do that it can work
thanks
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,759
Registered: ‎03-06-2006
Message 14 of 22 (292 Views)

Re: silent install with swinstall

>I write a script add to postremove. scripts content is: each "test"

How is that a valid script?

>but it can't work when I use swremove

Does your script get executed?
The script should look something like this:
#!/sbin/sh
# Lots of comments ... :-)
exitval=0 # Anticipate success : 1 = failure 2 = warning

UTILS="/usr/lbin/sw/control_utils"
if [ ! -f $UTILS ]; then
echo "ERROR: Can't find $UTILS"
exit 1
fi

. $UTILS

#================================================
rm -rf ${SW_ROOT_DIRECTORY}your-directory 2> /dev/null
exit $exitval
Please use plain text.
Advisor
alert0919
Posts: 27
Registered: ‎06-03-2009
Message 15 of 22 (292 Views)

Re: silent install with swinstall

Do i write any control script in swremove
or just write postremove /fullpath/xxx.sh
in my psf file

if I excute swremove command ,the postremove can work autmatically,or it need write something in my psf file to trigger xxx.sh

thanks
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,759
Registered: ‎03-06-2006
Message 16 of 22 (292 Views)

Re: silent install with swinstall

>Do I write any control script in swremove
or just write postremove /fullpath/xxx.sh
in my psf file

The latter. Check the documentation.
http://docs.hp.com/en/5992-5875/ch10s03.html

>if I execute swremove command, the postremove can work automatically, or it need write something in my psf file to trigger xxx.sh

You need to name the file postremove and package it in your PSF.
Please use plain text.
Advisor
alert0919
Posts: 27
Registered: ‎06-03-2009
Message 17 of 22 (292 Views)

Re: silent install with swinstall

my rough psf like this

# vi my.psf
distribution
layout_version 1.0

#Vendor info:
vendor
tag My_Vendor
title My_Vendor_Title
end

#Product definition: --this is what shows up with swlist
product
tag MY_PRODUCT
title My_custom_product
revision 1.0 #(or whatever it is)
fileset
tag fileset1
title My fileset
directory /source_dir/dir1=/destination_dir

# Control scripts:
postremove /my_script

#list all of the files that you wish to put in the bundle.
file filename1
file filename2

#set file permissions if desired
file -m 644 -o root -g users filename1
file -m 644 -o root -g users filename2
end #end fileset definitions
end #end product definition

in control script
# vi /my_script
echo â running my_script for postinstall scriptâ

but it don't run this script

any place that i need to add in my psf file that my postremove script work

thanks




Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,759
Registered: ‎03-06-2006
Message 18 of 22 (292 Views)

Re: silent install with swinstall

>any place that I need to add in my psf file that my postremove script work

You seem to have it right. But instead of an echo, you should echo to a logfile so you can look at it.

Does "swlist -l fileset -v -s $PWD/depot" show you your postremove script?

Also see how to check postremove:
http://docs.hp.com/en/5992-5875/ch11.html
http://docs.hp.com/en/5992-5875/ch11s09.html#v2215809

>file -m 644

In general, these files should be read only, 444.
Please use plain text.
Advisor
alert0919
Posts: 27
Registered: ‎06-03-2009
Message 19 of 22 (292 Views)

Re: silent install with swinstall

You need to add \* or the product to the end:
swinstall -s with-fullpath \*

what is the \* means

thanks
Please use plain text.
Regular Advisor
Anoop P_2
Posts: 91
Registered: ‎01-21-2004
Message 20 of 22 (292 Views)

Re: silent install with swinstall

\* means all products available in the depot.

NB: Quite a few of us have responded to your queries, so you are requested to assign points to those that might have helped you or hinted of a solution as the case may be.
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,759
Registered: ‎03-06-2006
Message 21 of 22 (292 Views)

Re: silent install with swinstall

>what is the \* means

The "*" is a SD wildcard that selects everything. It needs to be quoted so the shell doesn't expand it.
Please use plain text.
Advisor
alert0919
Posts: 27
Registered: ‎06-03-2009
Message 22 of 22 (292 Views)

Re: silent install with swinstall

thanks for all responser
I have solved my problem

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation