To make the software in a depot available for
use across a network by other SD-UX commands, you must register the depot. You can also unregister a depot if you do not want it to
be available.
Depots are registered or unregistered in these ways:
The swcopy command automatically
registers newly created depots. (You can turn this function on or
off with the register_new_depot option.)
The swremove command automatically
unregisters a depot after removing all the software the depot contains.
The swreg command explicitly registers or unregisters depots.
The swreg command lets you
explicitly register or unregister depots when the automatic registration
features of swcopy or swremove are not enough. For example, you can
use swreg to:
Make a CD-ROM or other
media available as a registered depot.
Register a depot that
was created with swpackage.
Unregister a depot to
restrict network access without physically removing the depot from
a host.
Register Media or Create Network Depot? |
|
When does it make
sense to use your software media as a registered depot versus using
the media to create a network depot? In general, using media as a
depot makes sense for small-scale use, such as when only one or two
other systems need to access the media. If more systems will need
to access the media, performance will be better if you create a network
depot from the individual media. See “Additional Depot Management Tasks and Examples” for an example.
Authorization |
|
To register a new depot or to unregister an existing
depot, swreg requires read permission on the depot
in question and insert permission on the host. To unregister a registered
depot, the swreg command requires write permission
on the host. See Chapter 9: “SD-UX Security ” for more information on permissions.
Using swreg |
|
swreg Syntax
swreg -l level [-u] [-v] [-C session_file] [-f object_file]
[-S session_file] [-t target_file] [-x option=value]
[-X option_file] [objects_to_register] [@ target_selections] |
Options and Operands
- -l level
Specifies the level of
the object to register or unregister, where level can be depot or root.
- -u
Causes swreg to unregister the specified objects instead of registering them.
- -v
Turns on verbose output
to stdout and
displays all activity to the screen.
- -C session_file
Run the command and save
the current option and operand values to a session_file for re-use
in another session. See “Session Files”.
- -f object_file
Reads a list of depots
or root objects to register or unregister from a object_file instead of (or in addition to) the command line.
- -S session_file
Run the command based
on values saved from a previous session, as defined in session_file. See “Session Files”.
- -t target_file
Read a list of target
selections from a separate file instead of (or in addition to) the
command line. See “Target Files”.
- -x option=value
Sets a command option to value and overrides
default values or a values in options files. See “Using Command Options”.
- -X option_file
Read session options and
behaviors from option_file. See “Using Command Options”.
- objects_to_register
The software objects to
be registered or unregistered.
- @target_selections
The target on which the
objects will be registered or unregistered. See “Target Selections”.
Changing Command Options
You can
change the behavior of this command by specifying additional command-line
options when you invoke the command (using the -xoption) or by reading predefined values from a file. The following
table shows the defaults and options that apply to swreg:
Table 4-5 swreg Command Options and Default Values
admin_directory=/var/adm/sw distribution_target_directory=/var/spool/sw logfile=/var/adm/sw/swreg.log
| rpc_binding_info=ncacn_ip_tcp:[2121] ncadg_ip_udp:[2121]
|
For More Information
See Appendix A for complete descriptions of each default.
swreg Examples |
|
To unregister a CD-ROM depot mounted at /mnt/cd, you would type:
swreg -l depot -u /mnt/cd
To register the same depot (mounted at /mnt/cd on the local host) as a depot to be available
on the network, type:
swreg -l depot /mnt/cd
The following
example enables direct access from one or two other systems to the HWEnable11i depot
on the Support Plus CD, assuming the Support Plus CD is mounted at/cdrom:
swreg -l depot /cdrom/HWEnable11i