Sun Management Center Change Manager 1.0.1 Administration Guide

Processing the Archive Parameters File With Finish Scripts

As the final step in software stack deployment, Change Manager runs the finish scripts contained in the Solaris Flash archive. Change Manager provides a script that executes all user-supplied finish scripts that it finds in the /etc/ichange.d directory of the newly deployed software stack. This script provides access to the values that the user specified in the archive parameters file.

Following is an example of a finish script that processes the archive parameters file created in the previous section:

#! /bin/sh

case `cmgetprop telnet` in
[Nn]*)  telnet='#'      ;;
*)      telnet=         ;;
esac

case `cmgetprop ftp` in
[Nn]*)  ftp='#'         ;;
*)      ftp=            ;;
esac

case `cmgetprop finger` in
[Nn]*)  finger='#'      ;;
*)      finger=         ;;
esac

ed $SI_ROOT/etc/inetd.conf <</
/^#*telnet/s/^#*/$telnet/
/^#*ftp/s/^#*/$ftp/
/^#*finger/s/^#*/$finger/
w
q
/

exit 0

You might use two or more finish scripts to process the parameters in the ic_cfgparams file. Ensure that the ic_cfgparams file contains all of the parameters that the scripts process.

Store all the finish scripts in the /etc/ichange.d directory prior to creating the Solaris Flash archive of the master system. The finish scripts must be part of the archive. If you have more than one finish script, they are processed in lexical order by file name.

Set the finish script permissions to 755. If the scripts are not executable, the Solaris Flash archive cannot be customized.

Finish scripts use the following elements: