Operating System - HP-UX
1834772 Members
3109 Online
110070 Solutions
New Discussion

system reboot after swinstall does not execute rcx.d/Kxxx files?

 
SOLVED
Go to solution
Kathy Khaghani
Advisor

system reboot after swinstall does not execute rcx.d/Kxxx files?

I installed some patches on my N-class recently and after system came up, checked the rc.log and rc.log.old files and I don't see any message regarding the rc shutdown scripts being run. any ideas?

thanks
Kathy
11 REPLIES 11
F Verschuren
Esteemed Contributor

Re: system reboot after swinstall does not execute rcx.d/Kxxx files?

you can configger this see /var/adm/sw/defaults and /usr/sbin/clean_reboot
James R. Ferguson
Acclaimed Contributor
Solution

Re: system reboot after swinstall does not execute rcx.d/Kxxx files?

Hi Kathy:

A 'swinstall' session that requires an automatic reboot executes 'reboot' and not 'shutdown'. A 'reboot' does not run any shutdown scripts.

Regards!

...JRF...
Pete Randall
Outstanding Contributor

Re: system reboot after swinstall does not execute rcx.d/Kxxx files?

It was my understanding that swinstall always did a "reboot" rather than a "shutdown" because the assumption was that your system would be inactive, i.e. DB and any critical apps would be shutdown already.


Pete

Pete
Kathy Khaghani
Advisor

Re: system reboot after swinstall does not execute rcx.d/Kxxx files?

Thanks James,

Is there a way to change that? If not, does reboot shuts down the processes gracefully?
Specifically for the informix database we have a shutdown script in rc0.d which insures that the database is shutdown gracefully.
F Verschuren
Esteemed Contributor

Re: system reboot after swinstall does not execute rcx.d/Kxxx files?

let me explain this is done on purpes, a instalation of a product causes executables to change, a stop script wil not work because the aplication that is upgraded is running on a other version that the stopscript can handele.
If you have a aplication that needs to be stoped like sap ore oracle and you do not want it to be forgotten you can configer some extra stopscripts before you system wil reboot:
see folowing instruktion

1 maks sure the nex lines are in the defaults file:
cat //var/adm/sw/defaults |grep -v ^#
swagent.reboot_cmd=/usr/sbin/clean_reboot
swinstall.rpc_binding_info = ncacn_ip_tcp:[2121]
swcopy.rpc_binding_info = ncacn_ip_tcp:[2121]
swremove.rpc_binding_info = ncacn_ip_tcp:[2121]
swconfig.rpc_binding_info = ncacn_ip_tcp:[2121]
swverify.rpc_binding_info = ncacn_ip_tcp:[2121]
swlist.rpc_binding_info = ncacn_ip_tcp:[2121]
swreg.rpc_binding_info = ncacn_ip_tcp:[2121]
swacl.rpc_binding_info = ncacn_ip_tcp:[2121]
swjob.rpc_binding_info = ncacn_ip_tcp:[2121]
########################

THan make sure the clean_reboot is filled in properly where you read YOURAPLICATION you have to fill in the stuf it needs to stop, do not fil in products that are installed whit swinstall because that might cause problems!

cat /usr/sbin/clean_reboot
#!/bin/sh

if [ -f /sbin/init.d/YOURAPLICATION] ; then
/sbin/init.d/YOUARPLICATION stop
else
echo "ERROR: Cannot find YOUAPLICATION stop script.."
fi
/usr/sbin/reboot
Pete Randall
Outstanding Contributor

Re: system reboot after swinstall does not execute rcx.d/Kxxx files?

No, reboot does not do a graceful shutdown. It, as you noted, skips all the shutdown scripts.


Pete

Pete
Kathy Khaghani
Advisor

Re: system reboot after swinstall does not execute rcx.d/Kxxx files?

well, Pete answered my last question. thank you all for fast replies.
F Verschuren
Esteemed Contributor

Re: system reboot after swinstall does not execute rcx.d/Kxxx files?

in my last replay
change YOURAPLICATION to your database stop script and it wil be stoped nice and after that the shutdown will follow...
Kathy Khaghani
Advisor

Re: system reboot after swinstall does not execute rcx.d/Kxxx files?

thanks again for your help everyone, i'm new to the forum, and already love it.
Kathy Khaghani
Advisor

Re: system reboot after swinstall does not execute rcx.d/Kxxx files?

i'm closing this thread
James R. Ferguson
Acclaimed Contributor

Re: system reboot after swinstall does not execute rcx.d/Kxxx files?

HI (again) Kathy:

In my opinion, if you are planning a patch application that requires a reboot (and the patch or installation notes that you *always* read ahead of time will tell you that) then you need to *schedules* a downtime with your users. Then, *before* beginning the 'swinstall' session, shutdown your applications!

Regards!

...JRF...