Sun Update Connection - Enterprise 1.0 User's Guide

Add Target Local (-atl) Command

The add-target-local command adds a file or a script to the local knowledge base.

Parameter

  • -pT category Specify the parent category name in which to create the new category. Valid values are: Probes, Pre-actions, Post-actions, Macros, Configuration files with a user-defined subcategory.

  • -f pathname Specify the full path name of the file to upload.

  • -ds description Specify an optional description.

  • -D distribution Specify the distribution for which this category is relevant. If not specified, the command operates on all distributions.

  • -tF If -f is a configuration file, creates a file declaration.

  • -tM If -f is a macro, use -tM with a display name for the macro.

  • -tP If -f is a pre-action, use -tP with a display name for the pre-action.

  • -tR If -f is a probe, use -tR with a display name for the probe.

  • -tS If -f is a post-action, use -tS with a display name for the post-action.

  • -v version Specify the version of the file. This is mandatory for configuration files only to supply a version suffix display name.

Syntax

uce_cli -atl -f "pathname" -pT category [ -ds "description>" ] ( -tF | -tM | -tP | -tR | -tS name ) [ -v version ] [ -D distribution ] -u username -p password

Example: Config file

uce_cli -atl -f "/home/admin/myFiles/print_v5" -pT "Configuration files/PrntVer" -ds "printcap Flr5" -tF "/etc/printcap" -v "05" -u admin -p 123

Example: Macro

uce_cli -atl -f "/home/admin/scripts/findhost.sh" -pT "hostname" -ds "finds local hostname for file localization" -tM "hostname" -u admin -p 123

Notes

Before performing this procedure, you must have created the category PrntVer under Configuration files and the category hostname under Macros (see Add Local Category (-alc) Command). You must also have created a script to upload as a macro. The example shows a script that finds the host name of the local host.

To find a valid value for -pT, use -fc with -T "Local/default category>/" -sons.

To find a valid value for -D, use the -ld command. If you do not name a specific distribution, the named parent category (value of -pT) must also be in all distributions.

The -t* parameter that you choose to use must match the -pT parameter. For example, if -pT is Macros/localhostname then use -tM to name the macro.

The -tM, -tP, -tR, and -tS parameters take any new name as a value.

The -tF parameter needs a file declaration as its value. If you use a new path name for this value, it creates a new file declaration. If you use -tF, you must use -v to give the Configuration file a display version.