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

6
Figure 1 /usr/local/bin/merge_system_files
Step 6 (Optional): Adjust target kernel tunables if needed
1. To determine kernel tunables on the source clone, issue the command:
drd runcmd kctune
2. To change tunable settings which are known to be different for the target, issue the command:
drd runcmd kctune <tunable_name>=<tunable_value>
#!/usr/bin/sh
#
# merge_system_files - Merges system file from new hardware
# into system file on source clone
# $1 - system file from new hardware to be merged into
# system file on DRD clone.
#
typeset -i module_found
system_new_hw=$1
system_merged=/var/opt/drd/mnts/sysimage_001/stand/system
cp -p ${system_merged} ${system_merged}.save
cat ${system_new_hw} |
while read module_keyword module_name module_state
do
module_found=0
# ignore obsolete drivers
case $module_name in
"fcd_fcp" | "fcd_vbus" | "usb_ms_scsi" | "sasd_vbus" )
break
;;
*)
if [[ ${module_keyword} = "module" ]]
then
grep ${module_name} ${system_merged} |
while read mod_keyword mod_name rest
do
if [[ ${mod_keyword} = "module" ]]
then
if [[ ${module_name} = ${mod_name} ]]
then
module_found=1
fi
fi
done
if [[ ${module_found} -eq 0 ]]
then
echo "Adding module ${module_name} ..."
echo "${module_keyword} ${module_name} ${module_state}" >> \
${system_merged}
fi
fi
;;
esac
done