Migrating packages from legacy to modular style

32
Limitations
cmeasymigrate is not supported via Serviceguard Manager.
Migration/Consolidation of CFS Checkpoint and snapshot packages is not supported with this tool.
Appendix A
The following shell script modifies the package configuration (ASCII) file, making the changes prescribed under
“Manual steps for migrating a legacy package” earlier in this document:
#!/bin/sh
# Input to script is packagename
# The steps to convert are:
# get the package controlscript name
# get the package ascii file
# get arguments - input is package name
if (( $# == 0 ))
then
echo "ERROR: Package name is required" exit 1;
fi
nupkg=$1
newpkg=$2
# Extract package attributes from package configuration file
# Remove run_script/halt_script and storage_group from ascii file
cmgetconf -v 0 -p $nupkg |
sed -e '/^$/d' \
-e '/^RUN_SCRIPT /d' \
-e '/^HALT_SCRIPT /d' > ./tmp/nu-pkg.ascii
# Append the upcc module name, version and operation_sequence.
cat ./tmp/nu-pkg. ascii |
sed -e '/PACKAGE_NAME/a\
module_name sg/all \
module_version 1 \
' \
-e '$a\
operation_sequence $SGCONF/scripts/sg/external_pre.sh \
operation_sequence $SGCONF/scripts/sg/volume_group.sh \