1829958 Members
1912 Online
109998 Solutions
New Discussion

SAM kernel updating

 
SOLVED
Go to solution
Dan Rosen
Frequent Advisor

SAM kernel updating

Easy 10 points for someone...

When you use SAM to update the kernel, and you have SAM swap the kernel and restart the system, does SAM reboot or shutdown the system?

Does it use shutdown which runs through the init levels shutting things down properly, or does it simply take the system down as "reboot" does?
12 REPLIES 12
linuxfan
Honored Contributor
Solution

Re: SAM kernel updating

Hi Dan,

When you use SAM to update the kernel, once you click "OK" to reboot your system, SAM does a "shutdown -y -r 0" to reboot the system.

You can look at the /var/sam/log/samlog file to find out exactly what's happening.

-HTH
I am RU
They think they know but don't. At least I know I don't know - Socrates
A. Clay Stephenson
Acclaimed Contributor

Re: SAM kernel updating

Hi Dan:

No SAM is not a gunslinger; it uses shutdown -r.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: SAM kernel updating

Hi Dan:

SAM calls 'reboot'. The graceful 'shutdown' sequence is *not* executed.

Karsten Crege had a suggestion for modifying this behavior in this thread, should you be interested:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x38a10cb17a32d5118fef0090279cd0f9,00.html

Regards!

...JRF...
Magdi KAMAL
Respected Contributor

Re: SAM kernel updating

Hi Dan,

SAM is executing :

/sbin/shutdown -y -r 0

and it is reported in /var/sam/log/samlog.

Magdi
Dan Rosen
Frequent Advisor

Re: SAM kernel updating

Ah! Points of contention!

It appears that we have two different answers! I suppose now I have to be a good system administrator and research the solution to my own question.

Who will be correct? Can James with his quadruple crown hold off two newcomers?!? Stay tuned to see who gets the points!
James R. Ferguson
Acclaimed Contributor

Re: SAM kernel updating

Hi (again):

Have a look at /usr/lib/sw/sys.defaults .

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: SAM kernel updating

Hi Dan:

I thought I remembered correctly. I just did a kernel rebuild via SAM on my 11i sandbox and it did execute the normal shutdown sequence. This is not the default behavior of swinstalls which do kernel rebuilds.

Clay
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: SAM kernel updating

Hi:

Clay, what does your 11.11 sys.defaults look like for the 'swagent.reboot_cmd' ? I'm basing my comments on 10.20 and on 11.0 systems.

Regards!

...JRF...
Dan Rosen
Frequent Advisor

Re: SAM kernel updating

OK, I think I have the definative answer (shame I can't give myself points...)

SAM appears to use the /var/sam/log/samlog. From within SAM, you can call another application, namely SWINSTALL. If you use Software Distribution from within SAM, it will do a REBOOT (default) on any packages that require a reboot.

However, I was changing kernel pararmeters from SAM. In this scenario, SAM runs the following command on my system:

Executing the following command:\C( trap "" 27 28; /usr/sbin/sync; cd /; /usr
/sbin/shutdown -y -r 0 >/dev/console 2>/dev/null )\C

(I haven't seen if this is default of if someone had tweaked this long ago).

Thanks for all of the answers, and points are coming!
A. Clay Stephenson
Acclaimed Contributor

Re: SAM kernel updating

Hi James,

My 11i sys.defaults is all comments. I know that a swinstall when invoke reboot by default.

Clay
If it ain't broke, I can fix that.
linuxfan
Honored Contributor

Re: SAM kernel updating

Hi,

sys.defaults on a 10.x, 11.x and 11.11 machine have the same definitions for reboot_cmd
swagent.reboot_cmd = /sbin/reboot
swagent.reboot_cmd = /etc/reboot
swagent.reboot_cmd = /usr/etc/reboot

Not sure why the default value for SunOS is included here. /etc/reboot is a link to /usr/sbin/reboot which is a link to /sbin/reboot.

Whenever you invoke swinstall (by itself or within SAM, unless you have modified /var/adm/sw/defaults or ~/.swdefaults it would use /sbin/reboot.

well another 5242 to go before i reach where Clay is today and 11916 to go before i catch up with James ;-)

-Regards
I am RU
They think they know but don't. At least I know I don't know - Socrates
James R. Ferguson
Acclaimed Contributor

Re: SAM kernel updating

Hi Folks:

God, yes!!! At lunch I realized that I was seeing (in my mind's eye) the 'swinstall' scenario, and *not* a simple kernel regeneration via SAM.

I came back to verify in SAM's viewer log, but you beat me to it, Dan! ;-) In fact, Ru, mentioned that too, now that I reread *all* of this thread.

I stand corrected.

Clay, I like the "gunslinger" anology!

With regards to all!

...JRF...