Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

BlPackage - addExternalCmdToStart_1

BlPackage - addExternalCmdToStart

Description :

This command adds an external command to the start of a BLPackage. You can specify the following single-user mode and reboot settings:

You can set the singleUserMode argument to one of the following strings:

  • NotRequired: Not Required
  • RevertTo: Use single-user mode without reboot
  • RebootAs: Reboot into single-user mode

You can set the rebootMode argument to one of the following strings:

  • NotRequired: Not required
  • AfterDeploy: After item deployment
  • AfterDeployWithReconfiguration: After item deployment with reconfiguration (Solaris ONLY)
  • OutOfBand: Out-of-band
  • AtJobEnd: By end of job
  • AtJobEndWithReconfigration: By end of job with reconfiguration (Solaris ONLY)

You can also specify return code override rules for the command and the undo command.

For background information on the concept of return code overrides, see DepotSoftware : setDepotSoftwareReturnCodeOverridesByDBKey .

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

pkgDBKey

DBKey

Handle to the BLPackage.

ecmdName

String

Name of the external command.

cmdFile

String

The script file for the external command. This file can be on a local or remote server.

undoCmdFile

String

The script file for the external undo command. This file can be on a local or remote server.

actFailure

String

Action on failure for the external command (Ignore, Continue, or Abort).

singleUserMode

String

The single-user mode.

rebootMode

String

The reboot mode.

cmdErrorRCO

String

The comma-separated list of return codes that should be interpreted as an error from the command. A blank string indicates that there are no overrides for this category.

cmdWarningRCO

String

The comma-separated list of return codes that should be interpreted as a warning from the command. A blank string indicates that there are no overrides for this category.

cmdRebootRCO

String

The comma-separated list of return codes that should be interpreted as a reboot request from the command. A blank string indicates that there are no overrides for this category.

cmdSuccessRCO

String

The comma-separated list of return codes that should be interpreted as success from the command. A blank string indicates that there are no overrides for this category.

undoCmdErrorRCO

String

The comma-separated list of return codes that should be interpreted as an error from the undo command. A blank string indicates that there are no overrides for this category.

undoCmdWarningRCO

String

The comma-separated list of return codes that should be interpreted as a warning from the undo command. A blank string indicates that there are no overrides for this category.

undoCmdRebootRCO

String

The comma-separated list of return codes that should be interpreted as a reboot request from the undo command. A blank string indicates that there are no overrides for this category.

undoCmdSuccessRCO

String

The comma-separated list of return codes that should be interpreted as success from the undo command. A blank string indicates that there are no overrides for this category.

Examples :

Example

The following example adds an external command with name sampleExternalCmd to the start of a BLPackage. The content of the command is from C:/temp/cmd.txt and the content of the undo command is from C:/temp/undocmd.txt. The external command aborts on failure.

Script

# Depot folder in which the BLPackage is stored.

PACKAGE_GROUP="/parent/group1"

# Name of the BLPackage.

PACKAGE_NAME="blpgk1"

SINGLE_USER_MODE=NotRequired

REBOOT_MODE=NotRequired

PACKAGE_DBKEY=`blcli BlPackage getDBKeyByGroupAndName $PACKAGE_GROUP $PACKAGE_NAME`

blcli BlPackage addExternalCmdToStart $PACKAGE_DBKEY sampleExternalCmd /c/temp/cmd.txt /c/temp/undocmd.txt "Abort" "$SINGLE_USER_MODE" "$REBOOT_MODE" "<0,1,2,3" "4,5,6,10..15" "100..200" "0" "<0,1,2,3" "4,5,6,10..15" "100..200" "0"

Example

The following example shows how to specify a remote command file. The file is located on a server with the hostname myRemoteServer.

Script

RESULT=`blcli BlPackage addExternalCmdToStart $PACKAGE_DBKEY sampleExternalCmd //myRemoteServer/c/temp/cmd.txt //myRemoteServer/c/temp/undocmd.txt "Abort" "$SINGLE_USER_MODE" "$REBOOT_MODE" "<0,1,2,3" "4,5,6,10..15" "100..200" "0" "<0,1,2,3" "4,5,6,10..15" "100..200" "0"`
Was this page helpful? Yes No Submitting... Thank you

Comments