useful little patch manager scripts

From: Hudes, Dana (hudesd@hra.nyc.gov)
Date: Thu Mar 08 2007 - 14:05:45 EST


These notes/scripts require that you have already installed and
configured Patch Manager (AKA update connection for solaris 10).

1- find out what's needed and get it

smpatch analyze >/root/$HOSTNAME.patch.needed
cut -f1 -d " "< $HOSTNAME.patch.needed >download.list
smpatch download -x idlist=download.list

2- install multi-user-mode-safe stuff to save time spent in single-user
mode

smpatch update

and then you may wish to run (1) again to cut down the list.

3 - this script assumes you've run (1) above it AND that you are now in
single-user mode and wish to install all patches in single user mode.
Some patches require a reconfiguration reboot after application because
they make changes to devices / device drivers so that's included:

#single user mode presumes!
smpatch add -x idlist=/root/download.list
sync;sync;reboot -- -r

You may wish to install this script in /etc/rc3.d and if you do be sure
to chmod +x the file. You should call it S99notify -- the S99 is
important so that it is the last stage of the boot process. Put your
address in $user....

#!/usr/xpg4/bin/sh
$user=me@my.domain
tail /var/adm/messages >/tmp/messages
unix2dos /tmp/messages | mailx -r $user -s `hostname` $user

The reason is quite simply that if you're starting with a
mostly-unpatched Solaris 8 HW 2/02 or even HW 2/04 it can take 5-6 hours
to run through all the patches on a machine with older cpus or less RAM
(and if you have a SF15K domain with lots of boards with the fastest
cpus available and fast disks it'll take a bit less -- and your OS will
be more recent anyway). Times are based on my experience doing multiple
E3500 machines and E10K domains all with 10K FC disks and 4GB RAM and 4
cpus (UII-400) as well as a couple 280Rs. Anyway, you get pretty tired
waiting for these patches to run when your maintenance window starts 2
hrs after the end of your regular shift so use the above, take a nap and
set an alarm to check on things in 7 hours.

=================
Dana Hudes
UNIX and Imaging group
NYC-HRA
+1 718 510 8586
=================

-----Original Message-----
From: sunmanagers-bounces@sunmanagers.org
[mailto:sunmanagers-bounces@sunmanagers.org] On Behalf Of Gene Beaird
Sent: Wednesday, March 07, 2007 8:57 PM
To: sunmanagers@sunmanagers.org
Subject: SUMMARY: Problems patching a Sun Netra T1

Thanks to all who replied:

Brad Morrison
Dana Hudes
Susan Thielen
Tony Magtalas

A couple recommended patchadd -u, and another recommended to do the
patches
in normal run mode. After trying to extract and install the zone files
on
the system, and verifying that only the main system partitions were
mounted
and showed in /etc/vfstab, I ended up just patching the beast in normal
run
mode, bringing the system down to init 0 and then booting it back to
normal
run mode. So far, no problems, although I ended up installing a total of
13
patches, and them taking about 2 hours to install.

After March 11th, I am going on a mission to find out who was
responsible
for this stuff and see what I can to do vote them out of office.
Thanks,
all!

Regards,

Gene Beaird

__________

Date: Mon, 5 Mar 2007 10:27:09 -0600
From: Gene Beaird <bgbeaird@sbcglobal.net>
Subject: Problems patching a Sun Netra T1
To: sunmanagers@sunmanagers.org
Message-ID: <92956545-8779-4D51-B632-4FA46188AD6B@sbcglobal.net>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

I was attempting to patch a system over the weekend that just
wouldn't let me patch. Im not sure if it is a disk issue, or what,
because the system just hung when trying to patch, no error messages,
or anything. Please read below and let me know if you have any
suggestions.

The system is a Netra T1 running Solaris 8. It requires the 2 DST
patches (timezone and lib c) as well as six of their dependencies, and
at least three more dependencies from some of those dependencies.

The system has 512 MB of RAM, and the following filesystem space
utilization:

/ 156 MB free
/usr 559 MB free
/var 796 MB free
/opt 368 MB free

When I brought the system down to single-user mode to patch, I tried a
patch that had a dependency. The system told me that, and terminated
the patch session. I then tried another patch. After checking for
installed patches and starting the 'determining disk space, dry run
method', the patch session just hung. Thinking it may be a disk space
issue, I aborted that patch and tried another one that was much smaller.
Same thing happened again.

With 12 patches to install, and already an hour out of the maintenance
window, I quit the patch session.

Another thing of note: When in single user mode, when attempting to do
an ls -al on the subdir I had the patches in, the list hung before
returning any of the patch directories. I could completely list the
contents of that subdir when the system was running in multi-user mode,
although it was kind of jerky returning the list, sort of like it was
very busy.

I did unmount and fsck the partition with no problem. Any thoughts?

Gene Beaird
Unix Support Engineer,
Pearland, Texas

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.7/713 - Release Date: 3/7/2007
9:24 AM
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:41:44 EDT