| United States-English |
|
|
|
![]() |
Managing HP-UX Software With SD-UX: HP 9000 Computers > Chapter 4 Registering Software Depots Registering Your Software (swreg) |
|
Just as with any other SD-UX command, swreg requires that you assemble options, targets and defaults into a command line or use command options to "point" to files containing targets, default behavior changes and other variables. The swreg command uses the command line interface only. There is no Graphical User Interface for swreg. swreg -l level
[-u] [-v] [ -C session_file]
[-f object_file] To create a new depot with swpackage, then register it with swreg: swpackage -s psf -d /var/spool/sw swreg -l depot /var/spool/sw To unregister a specific depot at the local host: swreg -u -l depot/cdrom To unregister a CD-ROM depot mounted at /mnt/cd, 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 @ sign is optional on the local host.) The swreg command supports the following options: Option Action
The swverify command supports the standard software selection syntax. For more details on software_selections syntax, see “Command Operands ”. The software_selections and target_selection operands are: Operand Action
In addition to the command-line options listed above, several swreg behaviors and policy options can be changed by editing extended option and default values found in the system-wide defaults file: /var/adm/sw/defaults. or in the user-specific defaults file: $HOME/.swdefaults. Table 4-1 “Registration Default Options ” shows the default options supported by swreg. See Appendix A “Default Options and Keywords ” for a complete listing and description of these defaults. Table 4-1 Registration Default Options
Each invocation of the swreg command defines a registration session. The invocation options, source information, software selections, and target hosts for this session are saved before the installation or copy task actually commences. This lets you re-execute the command even if the session ends before proper completion. Each session configuration is automatically saved to the file $HOME/.sw/sessions/swconfig.last. This file is overwritten at each invocation of swreg. You can save a session configuration to a specific file by executing swreg with the -C session_file option. If you do not specify a specific path for the session file, the default location is $HOME/.sw/sessions/. To re-execute a session file, specify the session file as the argument for the -S session_file option of swreg. Note that when you re-execute a session file, the values in the session file take precedence over values in the system defaults file. Likewise, any command line options or parameters that you specify when you invoke swreg take precedence over the values in the session file SD programs are affected by external environment variables and environment variables set for use by control scripts. For a description of external environment variables, see Chapter 11, Control Scripts. The registration of depots (and roots) determines which hosts are available for software management tasks (that is, which hosts have a daemon/agent running). It enables the controller system to retrieve and present (via swlist) a list of existing depots or roots from which a selection can be made. Registration information consists of the depot or root's identifier (its path in the host file system). Note that registration does not imply access enforcement. Access enforcement is left to security (see Chapter 9 “Controlling Access to Software Objects”). To register a new depot or to unregister-register an existing depot, swreg requires read permission on the depot in question and write permission on the host. To unregister a registered depot, the swreg command requires write permission on the depot. See Chapter 9 “Controlling Access to Software Objects” for more information on permissions. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||