Migrating an Integrity HP-UX 11iv3 Instance to New Hardware

15
Figure 2/var/opt/ignite/scripts/run_iux_postloads
Figure 3 var/opt/ignite/scripts/restore_iux_postloads
#!/bin/sh
IPD_DIR=/var/adm/sw/products
IUX_SCRIPT_NAME=iux_postload
find ${IPD_DIR} -name ${IUX_SCRIPT_NAME}.save |
while read saved_path
do
script_path=`echo ${saved_path} | \
sed -e 's/iux_postload.save/iux_postload/'`
if [[ -e ${script_path} ]]
then
# The iux_postload exists. It may be the one we created,
# or it may have been delivered by a new revision of the product.
# Only in the first case should we restore it to the version
# we saved, so look for identifying comment.
grep -q "To be removed after migration" ${script_path}
if [[ $? -eq 0 ]]
then
echo " Restoring ${script_path} .... "
/usr/bin/mv ${saved_path} ${script_path}
#else Didn't find identifying string.
# Subsequent release must have delivered new iux_postload.
# Don't touch.
fi
#else Didn't find the script at all.
# Subsequent release must have removed it. Don't do anything.
fi
# Remove saved_path, which may or may not exist.
/usr/bin/rm -f ${saved_path}
done
exit 0
#!/bin/sh
IPD_DIR=/var/adm/sw/products
IUX_SCRIPT_NAME=iux_postload
/usr/bin/find ${IPD_DIR} -name ${IUX_SCRIPT_NAME} |
while read script_path
do
echo " Running ${script_path} .... "
${script_path}
# Need to leave a harmless script named iux_postload
# for IUX to run later.
/usr/bin/mv ${script_path} ${script_path}.save
echo "/sbin/true" > ${script_path}
echo "# To be removed after migration" >> ${script_path}
/usr/bin/chmod 744 ${script_path}
done
exit 0