![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| commands do not finish | Raom | UNIX for Advanced & Expert Users | 1 | 04-16-2008 05:45 PM |
| How to wait for the subprocess to finish in tcl | nathgopi214 | Shell Programming and Scripting | 1 | 03-26-2008 09:40 AM |
| how do i finish this last one.. | newby2 | UNIX for Dummies Questions & Answers | 2 | 01-18-2008 11:52 AM |
| How can I wait for PID to finish in another shell | superdelic | UNIX for Advanced & Expert Users | 2 | 01-17-2005 10:17 PM |
| using tab to finish command line parameter | kymberm | Shell Programming and Scripting | 3 | 09-20-2002 03:54 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
|||||
|
I saw a small blurb here:
Quote:
![]() Here another resource: http://www.sun.com/solutions/blueprints/0800/jssec2.pdf Last edited by oombera; 03-27-2003 at 11:12 AM.. |
|
||||
|
If you can try
For example:
Look at the following line for your rule file, that is you have a SUN E420R, with between 512 and 1024 RAM size and a hard disk between 8 and 18 GB, use the normal_BE.profile ( in the /jumpstart/Profiles/BE directory) and a Finish script MR_inst_drivers_BE.sh (in /jumpstart/Drivers directory) model SUNW,Ultra-80 && memsize 512-1024 && disksize c0t0d0 8192-194560 - Profiles/BE/normal_BE.profile Drivers/MR_inst_drivers_BE.sh The MR_inst_drivers_BE.sh can look like this: Code:
#!/bin/sh
#
# Basic driver for Enterprise Engineering lab hosts.
#
FINISH_DIR="${SI_CONFIG_DIR}/Finish"
SCRIPT_LIST="install_recommended_patches.sh dns_config.sh cust_prof.sh"
for script in ${SCRIPT_LIST}
do
if [ -f "${FINISH_DIR}/${script}" ]; then
echo "Starting finish script: ${script}"
echo ""
. ${FINISH_DIR}/${script}
else
echo "ERROR: File not found: ${script}"
fi
done
3 scripts: install_recommended_patches.sh dns_config.sh cust_prof.sh For example install_recommended_patches.sh looks like: Code:
#!/bin/sh
#
#ident "@(#)install-recommended-patches.fin 1.6 00/10/19 SMI"
#
# This script is responsible for installing a Sun Recommended
# and Security Patch Cluster from ${BASEDIR}/${PATCH_DIR}.
set -x
errorCondition=0
mountedProc=0
BASEDIR="/a"
PATCH_SERV_DIR=""
PATCH_DIR="/mnt"
MNTTAB="${BASEDIR}/etc/mnttab"
OE_VER="`ps -ef |grep agregar |grep -v grep |awk '{print $13}'`"
mount -F nfs -o ro 192.168.215.183:/jumpstart/Patches ${BASEDIR}${PATCH_DIR}
case ${OE_VER} in
5.8)
PATCH_SERV_DIR=8_Recommended
;;
5.7)
PATCH_SERV_DIR=7_Recommended
;;
5.6)
PATCH_SERV_DIR=2.6_Recommended
;;
5.5.1)
PATCH_SERV_DIR=2.5.1_Recommended
;;
*)
errorCondition=1
;;
esac
if [ ${errorCondition} = 0 ]; then
if [ ! -d ${BASEDIR}${PATCH_DIR} ]; then
echo "The directory, ${PATCH_DIR}, does not exist."
else
# Some patches require a loopback filesystem be used when
# installing using chroot.
if [ -d /proc ]; then
if [ "`df -n /proc | awk '{ print $3 }'`" = "proc" ]; then
if [ -d ${BASEDIR}/proc ]; then
if [ "`df -n ${BASEDIR}/proc | \
awk '{ print $3 }'`" != "proc" ]; then
mount -F lofs /proc ${BASEDIR}/proc
mountedProc=1
fi
fi
fi
fi
if [ ! -s ${MNTTAB} ]; then
if [ -s /etc/mnttab ]; then
# First create ${MNTTAB} so patches can read it:
echo "Copying /etc/mnttab from miniroot to ${MNTTAB}"
echo ""
rm -f ${MNTTAB}
if [ "${OE_VER}" = "5.5.1" ]; then
# This is necessary for "install_cluster" to get the mount
# point for /var/sadm/patch from the "real" root filesystem.
cat /etc/mnttab | sed 's/\/a/\//g' > ${MNTTAB}
# This is necessary for "df" to execute which is needed by
# "install_cluster" to determine if enough free disk
# space exists on the target system.
touch ${BASEDIR}/etc/.mnttab.lock
chown root:root ${BASEDIR}/etc/.mnttab.lock
chmod 644 ${BASEDIR}/etc/.mnttab.lock
else
cp /etc/mnttab ${MNTTAB}
fi
else
echo "Could not find a valid /etc/mnttab"
errorCondition=1
fi
fi
if [ ${errorCondition} = 0 ]; then
SHOWCOMMAND=""
if [ -x ${BASEDIR}/usr/sbin/patchadd ]; then
SHOWCOMMAND="/usr/sbin/patchadd"
elif [ -x ${BASEDIR}/usr/bin/showrev ]; then
SHOWCOMMAND="/usr/bin/showrev"
fi
# if [ "${SHOWCOMMAND}" != "" ]; then
# echo "The following patches are currently installed:"
# echo ""
# chroot ${BASEDIR} ${SHOWCOMMAND} -p
# echo ""
# fi
cd ${BASEDIR}${PATCH_DIR}
if [ -d ${PATCH_SERV_DIR} ]; then
echo "Installing the ${PATCH_SERV_DIR} patch cluster."
echo ""
if [ "${SHOWCOMMAND}" = "/usr/sbin/patchadd" ]; then
chroot ${BASEDIR} /usr/sbin/patchadd -d -u \
-M ${PATCH_DIR}/${PATCH_SERV_DIR} patch_order
elif [ -x ${PATCH_DIR}/${PATCH_SERV_DIR}/install_cluster ]; then
chroot ${BASEDIR} \
${PATCH_DIR}/${PATCH_SERV_DIR}/install_cluster -q \
${PATCH_DIR}/${PATCH_SERV_DIR}
else
echo "Cannot find /usr/sbin/patchadd or install_cluster"
fi
else
echo "Could not find the ${PATCH_SERV_DIR} patch cluster"
fi
fi
cp -p ${BASEDIR}${PATCH_DIR}/nsswitch.conf /a/etc/nsswitch.conf
umount ${BASEDIR}${PATCH_DIR}
if [ ${mountedProc} = 1 ]; then
umount ${BASEDIR}/proc
fi
fi
fi
Code:
#!/bin/sh
#
#ident "@(#)install-recommended-patches.fin 1.6 00/10/19 SMI"
#
# This script is responsible for installing a Sun Recommended
# and Security Patch Cluster from ${BASEDIR}/${PATCH_DIR}.
set -x
errorCondition=0
mountedProc=0
BASEDIR="/a"
PATCH_SERV_DIR=""
PATCH_DIR="/mnt"
MNTTAB="${BASEDIR}/etc/mnttab"
OE_VER="`uname -r`"
echo "domain labo.mr.com.ar" >> /a/etc/resolv.conf
echo "nameserver 200.149.64.166" >> /a/etc/resolv.conf
echo "nameserver 200.149.64.167" >> /a/etc/resolv.conf
Code:
#!/bin/sh
#
#ident "@(#)install-recommended-patches.fin 1.6 00/10/19 SMI"
#
# This script is responsible for installing a Sun Recommended
# and Security Patch Cluster from ${BASEDIR}/${PATCH_DIR}.
set -x
errorCondition=0
mountedProc=0
BASEDIR="/a"
PATCH_SERV_DIR=""
PATCH_DIR="/mnt"
MNTTAB="${BASEDIR}/etc/mnttab"
OE_VER="`uname -r`"
echo "PATH=$PATH:/usr/local/bin:/usr/dt/bin:/usr/openwin/bin" >> /a/etc/profile
echo "export PATH" >> /a/etc/profile
Regards. Hugo. added code tags for readability --oombera Last edited by oombera; 02-17-2004 at 03:27 PM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|