This chapter describes these new and extended utilities.
If DCE Naming Services are used, these utilities
swreg - register or unregister distributions and installed software collections
swreg [-u] -l level [-f object_file] [-t target_file] [-x option=value] [-X option_file] [objects_to_register] [ @ target_selections]
The swreg utility controls the visibility of distributions and installed software collections to users who are performing software management tasks.By default, the swcopy utility registers newly created distributions and the swinstall utility registers newly created alternate installed software collections. By default, the swpackage utility does not register newly created distributions. The swremove utility unregisters a distribution or installed software collection if the distribution or installed software collection is empty.
The user invokes swreg to explicitly register or unregister a distribution or installed software collection when the automatic behaviors of swcopy, swinstall, swpackage and swremove do not suffice. For example:
- making a CD-ROM or other removable media available as a registered distribution
- registering a distribution created directly by swpackage
- unregistering a distribution without removing it with swremove.
When using DCE Naming Services (see referenced document DCE Directory), swreg also registers the name of the host serving the distribution or installed software collection in the appropriate XDSA-DCE group if not already done previously for other distributions or installed software collections.
The swreg utility supports the following options:
- -f object_file
Read the list of distribution or installed software collection objects to register or unregister from object_file instead of (or in addition to) the command line.
- -l level
Specify the level of the object to register or unregister. Exactly one level must be specified. The supported levels are:
- installed software collection
The object to be registered is a root.
- distribution
The object to be registered is a depot.
- -t target_file
Read the list of target hosts on which to register the distribution or installed software collection objects from target_file instead of (or in addition to) the command line.
- -u
Causes swreg to unregister the specified objects instead of registering them.
- -x option=value
Set the session option to value and override the default value (or a value in an alternate option_file specified with the -X option). Multiple -x options can be specified.
- -X option_file
Read the session options and behaviors from option_file.
The swreg utility supports the following syntax for each object_to_register. Each path specifies a distribution or installed software collection to be registered or unregistered:
pathThe swreg utility supports the following syntax for each target_selection:
host
The swreg utility supports the following extended options:
- distribution_target_directory=implementation_defined_value
Defines the location of the distribution object to register if no objects are specified and the level is distribution.
- installed_software_catalog=implementation_defined_value
Specifies the installed software collection catalog that is associated with each installed software collection path to be registered, if different than the implementation default.
- level=
Defines the default level of objects to register. The valid levels are root and depot.
- logfile=implementation_defined_value
This is the default command log file for the swreg command.
- loglevel=1
Controls the amount of output sent by the utility to log files.
- objects_to_register=
Defines the default objects to register or unregister. There is no supplied default (see distribution_target_directory above). If there is more than one object, they must be separated by spaces.
- rpc_binding_info=ncadg_ip_udp:[2121]
Defines the protocol sequence and endpoint which should be used to contact the daemon.
- rpc_timeout=5
Relative length of the communications timeout.
- select_local=true
If no target_selections are specified, select the local host as the target of the command.
- targets=
Defines the default target hosts on which to register or unregister the specified distributions or installed software collections.There is no supplied default (see select_local above). If there is more than target selection, they must be separated by spaces.
- verbose=1
Controls the amount of output sent by the utility to stdout and stderr, but not to logfiles.
- stdout
The swreg utility writes events with a status of SW_NOTE to stdout if permitted by the value of the verbose option.
- stderr
The swreg utility writes events with a status of SW_WARNING or SW_ERROR to stderr.
- logging
The swreg utility logs summary events at the host where the command was invoked. It logs events about each register or unregister operation to the daemon logfile associated with each target_selection.
The swreg utility contacts the daemon on the host targets specified, providing the distribution or installed software collection paths to register or unregister to each daemon. The daemon performs the following checks for each distribution or installed software collection:
- If attempting to register a distribution or installed software collection does not exist, generate an event:
- (SW_ERROR: SW_SOC_DOES_NOT_EXIST)
- If attempting to register a distribution or installed software collection that is already registered, issue an event:
- (SW_NOTE: SW_ALREADY_REGISTERED)
- If attempting to unregister a distribution or installed software collection that is not registered, issue an event:
- (SW_ERROR: SW_NOT_REGISTERED)
If these checks succeed, the daemon then registers the distribution or installed software collection in a local "host catalog". The format of the host catalog is undefined.
If the use_dce_directory_service option is set to TRUE, then the daemon also registers its server name in the appropriate XDSA-DCE group if not already done previously for other distributions or installed software collections. If a installed software collection was registered, then the daemon uses the group name defined by the dce_server_group option to register its server name. If a distribution was registered, then the daemon uses the group name defined by the dce_depot_group option.
The swreg utility returns one of the following exit codes:
- 0
- The objects_to_register were successfully (un)registered.
- 1
- The register or unregister operation failed on all target_selections.
- 2
- The register or unregister operation failed on some target_selections.
If there are any errors, then the register or unregister action fails.
swlist - list registered distributions and installed software collections
swlist -l level [ @ target_selections]
XDSA-DCE extends the POSIX 1387.2 standard swlist utility to also list registered distributions and installed software collections on local or remote hosts.If using DCE Naming Services (see referenced document DCE Directory), swlist can also be used to list hosts with installed software collections or hosts with distributions that have been registered in the DCE namespace.
XDSA-DCE extends the swlist utility to support the following options:
- -l level
Specify the level of the object to list. In addition to the levels supported in the POSIX 1387.2 standard, the following levels are supported:
- root
list registered installed software collections on a host
- depot
list registered distributions on a host.
If DCE Naming Service is being used, the following additional levels are supported:
- host
list registered hosts containing installed software collections
- host_with_depots
list registered hosts containing distributions.
The list utility supports the following syntax for each target_selection when listing registered installed software collections or distributions:
[host][:][path]
XDSA-DCE extends the swlist utility supports the following extended options:
- level=
Defines the default level of objects to list. Additional valid levels are installed software collection, distribution, host and host_with_depots.
- stdout
The swreg utility displays a list of registered installed software collection or distribution paths for all target selections.The output has one distribution or installed software collection path per line. Blank lines may exist and white space may precede and/of follow the path. On any line containing a # character, all characters that follow the # character up to but excluding the next <newline> character are ignored.
In the cases where the installed_software_catalog is also listed, it is listed on the same line as the path, separated by white space.
If the level is distribution or installed software collection, the swreg utility contacts the daemon on the host from each target selection. The daemon returns a list of registered distributions or installed software collections for each host target selection.If the target selection includes a path, then that only that path is listed and only if it is registered.
When listing registered installed software collections, the value of the installed_software_catalog for each installed software collection is listed on the same line as the path for the installed software collection, separated by white space, if that value is different than the value of the default installed_software_catalog option provided to swlist.
If the level is host or host_with_depot, the swreg utility contacts the DCE Naming Service and lists the hosts registered in the group name specified by the dce_server_group or dce_depot_group option respectively.
- 0
- The list operation succeeded for all targets
- 1
- The list operation failed on all target_selections
- 2
- The list operation failed on some target_selections.
None.
Contents | Next section | Index |