Operating System - HP-UX
1834779 Members
2858 Online
110070 Solutions
New Discussion

Re: help on Package Building Swpackage/swinstall

 
SOLVED
Go to solution
LeoThe13th
Advisor

help on Package Building Swpackage/swinstall

Hi,
I am working for client in a outsourcing project. I was planning to automate the packaging and deploying activity. As i have know swinstall/swpackage of HP UX. i started preparaing psf file,etc.
I dont have super user password and i cant get superuser password; as i am developer.
As per my knowledge swinstall/swpackage needs root login for executon.

I have a question is there any other user through which i can execute above commands. Or is there any specific privelges i will get for my dev user so that i can run above commands.

Can anyone help on this....

Thanks
Bhushan
12 REPLIES 12
Dennis Handly
Acclaimed Contributor
Solution

Re: help on Package Building Swpackage/swinstall

Have you tried "-x run_as_superuser=false"?

Make sure you realize this can't be used for OS or special ownership files. See swpackage(1m).

You could also try sudo and RBAC to change to root for specific commands.
LeoThe13th
Advisor

Re: help on Package Building Swpackage/swinstall

Thanks,
I am to create package and install it succesfully with -x run_as_superuser=false
I am using following lines for packaging and installing.
swpackage -vv -x run_as_superuser=false -x media_type=tape -s packaging.psf @ SDK_AUTO_DEMO.depot

swinstall -x run_as_superuser=false -s /home/opsman/Bhushan/packaging/SDK_AUTO_DEMO.depot SDK_AUTO_DEMO

But when i am trying to reomve with following line i am getting an error
swremove -p -v -x run_as_superuser=false -d SDK_AUTO_DEMO.Binaries @ /home/opsman/Bhushan/packaging/SDK_AUTO_DEMO.depot

ERROR: "hwbbsb05:/home/opsman/Bhushan/packaging/SDK_AUTO_DEMO.depot":
Cannot establish a lock on this target because of an external
error (for example, the lock file could not be created).
* Target connection failed for
"hwbbsb05:/home/opsman/Bhushan/packaging/SDK_AUTO_DEMO.depot".
ERROR: More information may be found in the daemon logfile on this
target (default location is
hwbbsb05:/var/adm/sw/swagentd.log).
* Selection had errors.

Can anyone please help in resolving the above error.

Thanks in advance.
Bhushan
Dennis Handly
Acclaimed Contributor

Re: help on Package Building Swpackage/swinstall

>But when I am trying to remove with following line I am getting an error
swremove -p -v -x run_as_superuser=false -d SDK_AUTO_DEMO.Binaries @ /home/opsman/Bhushan/packaging/SDK_AUTO_DEMO.depot

Why are you using -p?
You don't use -d nor @ if you installed it in / like you did above.

What does "swlist -l fileset x run_as_superuser=false SDK_AUTO_DEMO" show?
Dennis Handly
Acclaimed Contributor

Re: help on Package Building Swpackage/swinstall

Oops that was:
swlist -l fileset -x run_as_superuser=false SDK_AUTO_DEMO
LeoThe13th
Advisor

Re: help on Package Building Swpackage/swinstall

hwbbsb05:/home/opsman/Bhushan/packaging>>swlist -l fileset -x run_as_superuser=false SDK_AUTO_DEMO
# Initializing...
# Contacting target "hwbbsb05"...
# Installed software catalog: /var/home/opsman/sw/products
#
# Target: hwbbsb05:/
#

# SDK_AUTO_DEMO 1.0 HP OpenView Software Distributor
SDK_AUTO_DEMO.Binaries


Can you please help in how swremove statement looks like.
Thanks
Bhushan
LeoThe13th
Advisor

Re: help on Package Building Swpackage/swinstall

I have used below comment
swremove -v -x run_as_superuser=false SDK_AUTO_DEMO.Binaries


This works..
Thanks for ur help

Bhushan
Dennis Handly
Acclaimed Contributor

Re: help on Package Building Swpackage/swinstall

>Thanks for your help

If you are happy with the answers you have gotten, please read the following about assigning points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33
http://forums.itrc.hp.com/service/forums/pageList.do?userId=WW147055&listType=unassigned&forumId=1
LeoThe13th
Advisor

Re: help on Package Building Swpackage/swinstall

Thanks Dennis for ur help. I will assign points.

Still i am facing few issues.
I need compile/run the sql file in post installation while deploying the [package.

it always give me error/warning in post-installation. i tried with keeping sql statament in shell script sqlplus / @/abc.sql;
exit

But above statement gives warning.
Is i am missing something while packaging or we cant run sql scrips or oracle package while installation.
Thanks
Bhushan
Dennis Handly
Acclaimed Contributor

Re: help on Package Building Swpackage/swinstall

>it always give me error/warning in post-installation.

What is the message?

>Am I missing something while packaging or we cant run sql scrips or oracle package while installation.

If you need to reboot, you would have problems. But if you don't, you would need to make sure you have all of your PATH and other variables set in your control script.
LeoThe13th
Advisor

Re: help on Package Building Swpackage/swinstall

Hi,
In my post installation script i have following command
sqlplus -s rcrp/rcrp
Initiall it gives an error sqlplus not found. Then I have done user ORACLE_HOME.

/dboracle/orabase/product/9.2.0.6/bin/sqlplus -s rcrp/rcrp

Then i am getting following error
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

As u mention we need to declare all env varibale in control scripts. I have tried few ways but still giving an error. Can you please mentiopn how to do that.

Thanks
Bhushan
LeoThe13th
Advisor

Re: help on Package Building Swpackage/swinstall

I have tried following commands in post install::::
ORACLE_HOME=/dboracle/orabase/product/9.2.0.6
ORACLE_SID=cisa2
LD_LIBRARY_PATH=/dboracle/orabase/product/9.2.0.6
PATH=$PATH:/dboracle/orabase/product/9.2.0.6/bin
echo $PATH
echo $ORACLE_HOME

$ORACLE_HOME/bin/sqlplus ncdb/ncdb @/home/opsman/Bhushan/packaging/demo.sql

Getting following error::::
+ /dboracle/orabase/product/9.2.0.6/bin/sqlplus ncdb/ncdb @/home/opsman/Bhushan/packaging/demo.sql
Error 6 initializing SQL*Plus
Message file sp1.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
ERROR: The "postinstall" script for "SDK_AUTO_DEMO" failed (exit code
"1"). The script location was
"/var/tmp/BAAa20562/catalog/SDK_AUTO_DEMO/pfiles/postinstall".


Need Help!!!!!!!!!!!11
Dennis Handly
Acclaimed Contributor

Re: help on Package Building Swpackage/swinstall

>SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

It seems this thread is also getting that problem:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1285631

>we need to declare all env variable in control scripts.

And env variable is a shell variable that is exported. So you need:
export ORACLE_HOME=/dboracle/orabase/product/9.2.0.6
export ORACLE_SID=cisa2
export LD_LIBRARY_PATH=/dboracle/orabase/product/9.2.0.6
export PATH=$PATH:/dboracle/orabase/product/9.2.0.6/bin

(You probably don't need it for PATH since already exported.)