SUMMARY:Patch clusters and jumpstart

From: Leonard, Roger (Roger.Leonard@marconi.com)
Date: Mon Jul 24 2000 - 12:47:24 CDT


Original question:

>
>I am trying to install the latest 2.7 patch cluster via a jumpstart finish
>script and am getting the following errors:
>
>fsrdlock_mnttab: open /etc/.mnttab.lock no such files or directory
>df: could not find mount point for /var/sadm/patch
>/patches/install_cluster: test: argument expected
>
>In looking through sunsolve, i found the same problem was back in 2.5 also
>and is due to trying to do a patchadd via a chroot. there were some really
>kludgy workarounds including using -d flag which does not allow the patches
>to be backed out. but i would prefer to do it properly. at this point i am
>thinking about having the finish script create an rc file that gets
executed
>and then deleted upon reboot, but am open to suggestions. does anyone else
>do the install_cluster via a finish script?

SUMMARY

Many thanks to the half dozen or so people who responded. the responses
were varied but all in all the consensus was to use a self deleting rc
script. After trying many different approaches, I settled for the rc route
myself and created a patches.fin file like this:

#!/bin/ksh
#
echo "Copying patch.rc "
#
cp /tmp/install_config/patch.rc /a/etc/init.d/jumpatch.rc
cd /a/etc/rc3.d
ln -s ../init.d/jumpatch.rc ./S99Patch
touch /a/noautoshutdown

The patch.rc script is like this:

#!/bin/ksh
#This gets installed by the patch.fin finish script for jumpstart
#
patch_srvr=hostname:/home/filesystem
#
echo "Running patch.rc "
#
install ()
{
echo ""
echo ""
echo ""
echo ""
if [ ! -d /jump ]
  then
   echo "/jump not found, creating it."
   mkdir /jump
fi
mount -o vers=2 ${patch_srvr} /jump
if [ $? = 0 ]
        then
         cd /jump/2.7patches/7_Recommended
           echo "Installing Solaris Recommended Patch Cluster"
           /jump/2.7patches/7_Recommended/install_cluster <<EOF
y
EOF
#The following installs misc patches not in cluster
          cd /jump/2.7patches
          for j in `cat /jump/2.7patches/patch_order`
          do
            echo ""
            echo ""
            echo "Installing Solaris Patch ${j}"
            echo ""
            echo ""
            /usr/sbin/patchadd `pwd`/${j}
          done
fi
}

# main
install
if [ -f /etc/init.d/jumpatch.rc ]
then
  rm /etc/init.d/jumpatch.rc
fi
if [ -f /etc/rc3.d/S99Patch ]
then
  rm /etc/rc3.d/S99Patch
fi
umount /mnt
/usr/ucb/shutdown -r now

This works fine. I am still adding some error trap and custom logic for our
config but this works as-is.

thanks

Roger D. Leonard
Sr. Network Analyst
Marconi Communications
rleonard@fore.com

S
U BEFORE POSTING please READ the FAQ located at
N ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/faq
. and the list POLICY statement located at
M ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/policy
A To submit questions/summaries to this list send your email message to:
N sun-managers@ececs.uc.edu
A To unsubscribe from this list please send an email message to:
G majordomo@sunmanagers.ececs.uc.edu
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:
I http://www.latech.edu/sunman.html
S
T



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:12 CDT