The changemgr command is in the /opt/SUNWichange/bin directory, so add this directory to your search path ($PATH environment variable).
Start a Change Manager session.
$ changemgr session [ -u username ] [ -p file ] [ -d domain ] \ [ command [ command-arguments ] ] |
Specify the user name to authenticate. If this option is not specified, the user is the current UNIX user.
file consists of a single line, which contains the password. If file is -, then the user can supply the password as standard input.
If the -p option is not supplied, then the changemgr command prompts the user for his password.
Specify the administrative domain on which to operate. In the context of a session, the default is the domain specified for the session. If no domain is specified, domain is the user's home domain. By default, domain is the user's home domain.
Normally, command is a ksh or sh script that contains Change Manager commands in the form of the command-line interface.
If command is one of the ksh or the sh shells , you get an interactive session.
Specifies the optional arguments to command.
The following command line initiates an interactive Change Manager session that uses the ksh command. The session is an authenticated subshell.
$ changemgr session ksh |
The following command line initiates an interactive Change Manager session that uses the value of $SHELL to determine which shell to use. Since the value of $SHELL is /bin/ksh, then ksh is used. The session is an authenticated subshell.
$ changemgr session |
The following example shows an interactive Change Manager session. The changemgr session command starts a subshell in which you can run authenticated changemgr commands.
Suzi uses the command-line interface to purge a completed job from the job queue. This job, IC_1, was initiated from the browser interface. When Suzi is done with these tasks, she exits the session by typing exit at the subshell prompt.
$ changemgr session Password: Suzi's password $ changemgr jobs -l IC_1 IC_1 succeeded $ changemgr ack IC_1 $ changemgr jobs -l IC_1 $ exit |
This example shows how to use the changemgr session command to run a script. The command line runs the script called deploy-web, which contains the following:
#/bin/sh changemgr import "$1" /web-server changemgr fileset -s MediaName=s9.miniroot "$1" changemgr hostset -s base_config_flar_archive="/$1" "$2" changemgr update "$2"
The following command line runs the deploy-web script.
$ changemgr session deploy-web web.flar host1 |