Sun Update Connection - Enterprise 1.0 User's Guide

Local Component Commands

The following commands are used to manage local software and files.

This section includes the following:

Add Local Category (-alc) Command

The add-local-category command creates a new category under Local, under Probes, Pre-actions, Post-actions, Macros, or Configuration Files.

Use this command if you want to upload scripts and files to the local knowledge base. You cannot upload a local file or script until you have created a category to hold it.

Parameter

  • -T component Specify the name of the component. If you type part of a name, without -sons, the output will be all components that have this string in their names. The value you specify is case-insensitive.

  • -ds description Specify an optional description of the new category.

  • -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, or one of these, with /existing-subcategory.

  • -D distribution Specify the distribution to use. If not specified, the command operates on all distributions.

Syntax

uce_cli -alc -T "category" [ -ds "description" ] -pT "parent-category" [ -D distribution ] -u username -p password

Example

uce_cli -alc -T "PrintcapVersions" -ds "various config files to set up different printers" -pT "Configuration files" -u admin -p 123

To get a list of the valid values for the -pT parameter, use the -fc command, with "Local" as the value of its -T parameter.

One or both of "ROOT/Local/Local RPMs" or "ROOT/Local/Local PKGs" is listed, but are not valid values for the -alc command; all the other items in this output are acceptable.

Add Software Package (-asp) Command

The add-software-package command pushes a local software package to the local knowledge base.

Parameter

  • -f pathname Specify the full path name of the source RPM file.

  • -T category Specify the name of the category in which to add this RPM.

  • -D distribution Specify the distribution to use. If not specified, the command operates on all distributions.

Flag

-secure Security fix mark. If present, the local package is a security fix for a previous version.

Syntax

uce_cli -asp -f "pathname" [ -secure ] -D distribution [ -T category ] -u username -p password

Example

uce_cli -asp -f "/usr/share/myApps/myApp01.05-73.rpm" -D RH9_IA32 -u admin -p 123

To learn more about the security fix mark and when to use the -secure flag, see To Fix Local Software Missing Dependencies and Fixing Local Dependencies.

To get valid values for the -D parameter, use the -ld command.

Add File Declaration (-afd) Command

The add-file-declaration command adds a file declaration to the local knowledge base. A file declaration is the target path name for installation of a local Configuration file onto managed hosts.

Parameter

  • -pT category Specify the parent category name in which to create the new category. This value must be a user-defined category under Configuration files.

  • -ds description Specify an optional description of the new file.

  • -tfp pathname Specify the target path name for installation on remote hosts.

  • -D distribution Specify the distribution to which the file applies. If not specified, the command operates on all distributions.

Syntax

uce_cli -afd -pT "category" [ -ds "description" ] -tfp "pathname" [ -D distribution ] -u username -p password

Example

uce_cli -afd -pT "Configuration files/PrintcapVersions" -ds "install directory for printcap versions" -tfp "/etc/printcap" -u admin -p 123

Before you can create a file declaration, you have to have a category under Configuration files. Use the -alc command to create a category. To see a list of categories, use the -fc command with -T "Local/Configuration files" -sons.

The output of this command would give valid values for the -pT parameter of the -afd command. You can shorten the path of the category component to Configuration files/category. You do not need to type the full path from the root.

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.