System Administration Commands smcconf(1M)
NAME
smcconf - configure the Solaris Management Console
SYNOPSIS
/usr/sadm/bin/smcconf [-h] [-v] toolbox [action] [target]
[parameters] [options]/usr/sadm/bin/smcconf [-h] [-v] repository [action]
[target] [parameters] [options]DESCRIPTION
The smcconf command configures the Solaris Management Con-
sole. See smc(1M). This command enables you to add to, remove from, and list the contents of the toolboxes and bean repository.Using smcconf to edit toolboxes is not as feature-rich as
using the graphical editor in Solaris Management Console. The command line interface is intended for use in packaging scripts that do not require user interaction. To edit all the properties of a toolbox or to modify the hierarchy of folders in a toolbox, you must use the specialized graphical editor, that is, smc edit. See smc(1M).smcregister is intended to replace the smcconf command as
the preferred interface for managing the Solaris Management Console repository as well as toolboxes from within scripts,due to significant performance enhancements over smcconf.
See smcregister(1M), smccompile(1M), and the Solaris Manage-
ment Console SDK Guide at /usr/sadm/lib/smc/docs/sdkguide/index.html for details. OPTIONS The following options are supported:-h Prints out a usage summary for the command.
-v Verbose option. Displays the debugging output at any
time. toolbox configuration action Legal values are: add Adds a target to the toolbox. Specify the path to the toolboxusing the -B toolboxpath option and,
SunOS 5.11 Last change: 11 Dec 2009 1
System Administration Commands smcconf(1M)
optionally, provide locale informa-
tion with the -L locale option.
remove Removes a target from the toolbox. Specify the path to the toolboxusing the -B toolboxpath option and,
as an alternative, provide localeinformation with the -L locale
option. create Creates a new toolbox with no tools in it. The only target recognized is toolbox. list Lists the contents of the toolbox. No target is recognized. If you specify a parameter, it is taken asthe path to a toolbox and the con-
tents of that toolbox are listed. If you do not specify a parameter, the contents of the default toolbox are listed. target Legal values are: tool If the action is specified as add, this target adds a native Solaris Management Console tool from the toolbox. The required parameter is the full Java classname of the tool you are adding. If you specify afolder name with the -F option, the
tool is placed inside that folder (the folder will not be created ifit does not already exist). Other-
wise, the tool is appended to the end of the toolbox and not placed inside any folder. If the action is specified as remove, this target removes a native Solaris Management Console tool from the toolbox. The required parameter is the full Java classname of the tool you want to remove. If you specify a foldername with the -F option, any tool
SunOS 5.11 Last change: 11 Dec 2009 2
System Administration Commands smcconf(1M)
with the given name in that folder will be removed. If no folder name is specified, all tools with the given name in the toolbox are removed.For the tool to appear in the con-
sole, the tool must also be registered in the repository. Seethe repository configuration sec-
tion below for more information. If a tool is referenced in a toolbox but is not registered, it will not appear in the console when the toolbox is loaded. Removing a tool from a toolbox does not remove the tool from the server repository. tbxURL If the action is specified as add or remove, this target adds to or removes from the toolbox a link to another toolbox. The required parameter is the URL to the other toolbox. The properties of addition and removal are the same as for the tool target. toolbox If the action is specified as create, this target creates a skeleton toolbox with no tools. Therequired parameters are: the tool-
box name, description, and small and large icon paths. These must befollowed by the -B toolboxpath and
-D scope options.
legacy If the action is specified as add or remove, this target adds or removes legacy applications(command-line, X-windows, and web-
based) to or from the toolbox. The-N, -T, -E, and -B options are
required. The -A option is
optional. Placement in the toolboxwith the -F option follows the same
SunOS 5.11 Last change: 11 Dec 2009 3
System Administration Commands smcconf(1M)
rules as for the tool and tbxURLtargets. See NOTES for more infor-
mation about legacy applications. folder If the action is specified as add, this target adds a folder to the toolbox. The required parameters are: the folder name, description, and small and large icon paths. If the action is specified as remove, this target removes a folder from the toolbox. If the folder to be removed is itself inside a folder, the containing folder must be specified with the-F option.
parameters Specifies values that might be required, depending on the combination of action and target.options Supported options for various action and tar-
get combinations for the toolbox configuration are:-A parameters Specifies the parame-
ters to pass to the legacy application.This option is avail-
able only for the legacy target.-B toolboxpath Specifies the path of
the toolbox that is being modified. If this option is notgiven, the modifica-
tions will be per-
formed on the defaulttoolbox, This Com-
puter.-D scope Specifies the scope
(domain) in which the tool should be run.SunOS 5.11 Last change: 11 Dec 2009 4
System Administration Commands smcconf(1M)
The legal values for scope are file, nis, dns, and ldap. This can also be specified for a folder or a toolbox. In the former case, all tools in thatfolder and its sub-
folders are run in that scope; in the latter, all tools in the toolbox are run in that scope.-E appPath Specifies the abso-
lute executable pathof the legacy appli-
cation. This option is available only for the legacy target.-F folder Specifies the full
path of the container folder. If this option is not given, the default folder is the `root' folder of the toolbox.-H [host_name][:port] Specifies the host
and port from which a tool should beloaded. If host_name
is not given, the default host is used. The default host is localhost, if the toolbox is loaded from the local file system, or the hostfrom which the tool-
box is loaded if loaded from a remote Solaris Management Console server. If :port is not given, the default port willSunOS 5.11 Last change: 11 Dec 2009 5
System Administration Commands smcconf(1M)
be used. If this option is not given at all, both the default host and the default port are used.-L locale Specifies the locale
of the toolbox that is being modified. The default is the C locale.-N appName Specifies the name of
the legacy applica-
tion being registered. This is the name that appears in the console. This option is available only for the legacy target.-P key:value Specifies the
key/value pairs that define parameters to a tool. Multiple key/value pairs can be specified at a time.-T appType Specifies the legacy
application type. Legal values are CLI, XAPP, or HTML. This option is available only for the legacy target. repository configuration The Solaris Management Console repository stores information about the registered tools and services, as well as libraries (for instance, resource jars) and properties attached to tools or services.SunOS 5.11 Last change: 11 Dec 2009 6
System Administration Commands smcconf(1M)
action Legal values are: add Adds information to the repository. Ifthe -f option is given to add, the
information overwrites any informationof the same name already in the reposi-
tory. If the -f option is not given, an
error might be returned if the informa-
tion is already in the repository. remove Removes information from the repository. list Lists the contents of the repository: o All registered tools o All registered services o All libraries attached to all tools o All libraries attached to all services o All libraries attached to all tools and services target Legal values are: bean If the action is specified as add, this target will add a tool or service bean (which kind is determined by thecontents of the bean) to the reposi-
tory. The required parameter is the path to the jar file that contains the bean to be added. If the action is specified as remove,this target will remove a tool or ser-
vice bean from the repository. The required parameter is the full Java classname of the desired bean. library If the action is specified as add, this target adds a "library" jar file to a tool or service bean. The two required parameters are the full JavaSunOS 5.11 Last change: 11 Dec 2009 7
System Administration Commands smcconf(1M)
classname of the desired bean and the path to the jar file to be attached. The bean name can also be one of the"pseudo-beans," ALL, ALLTOOL, or
ALLSERVICE, in which case the library is attached, respectively, to all beans, all tools, or all services in the repository. If the action is specified as remove, this target detaches a "library" jar file from a tool or service bean. The two required parameters are the full Java classname of the desired bean and the name of the jar file that is attached. As with the add action, thethree "pseudo-beans" ALL, ALLTOOL, or
ALLSERVICE can be used. property If the action is specified as add, this target defines a property on a tool or service. One or more key/value pairs must be specified in the form,-P key=value
Following this property list is a"pseudo-bean name," pseudoBeanName, as
defined for the library target, on which the properties are defined. Optionally, a library name can followthe "pseudo-bean" name, in which case
the properties are defined on the library that is attached to the named bean. If the action is specified as remove, this target undefines a property on a tool or service. The key/value pairs,"pseudo-bean" name, and optional
library are specified for the add action.EXAMPLES
Example 1 Adding Legacy Applications to a ToolboxSunOS 5.11 Last change: 11 Dec 2009 8
System Administration Commands smcconf(1M)
The following command adds to the default toolbox the com-
mand line interface (CLI) application, /usr/bin/ls, witharguments -al -R, giving it the name, Directory Listing:
/usr/sadm/bin/smcconf toolbox add legacy -N "Directory Listing" \
-T CLI -E /usr/bin/ls -A "-al -R"
Example 2 Adding a Folder to a Toolbox The following command adds to the standard Management Tools toolbox a folder with the name, New Folder, the description, This is a new folder, and the small and large icons,folder_s.gif and folder_l.gif:
/usr/sadm/bin/smcconf toolbox add folder "New Folder" \
"This is a new folder" folder_s.gif folder _l.gif \
-B /var/sadm/smc/toolboxes/smc/smc.tbx
Example 3 Adding a Native Solaris Management Console Tool to a ToolboxThe following command adds a native Solaris Management Con-
sole tool to the default toolbox. The Java classname of the tool is HelloWorld.client.HelloTool (the name, description, and icons visible in the console are provided by the tool itself). When loaded, it is run in the NIS domain, syrinx, which is hosted by the machine, temple, and is retrieved from port 2112 on the machine from which the toolbox was loaded:/usr/sadm/bin/smcconf toolbox add tool HelloWorld.client.HelloTool \
-D nis:/temple/syrinx -H :2112
Example 4 Adding an Solaris Management Console Tool to the Repository The following command adds the Java bean found in HelloWorld.jar to the repository. The jar file contains information that the bean is a tool:SunOS 5.11 Last change: 11 Dec 2009 9
System Administration Commands smcconf(1M)
/usr/sadm/bin/smcconf repository add bean HelloWorld.jar
Example 5 Removing an Solaris Management Console Service from the repositoryThe following command removes a Java bean from the reposi-
tory. Although the name of the bean implies that it is a service, that is merely a convention; the repository knows whether a particular registered bean is a tool or a service:/usr/sadm/bin/smcconf repository remove bean \
HelloWorld.server.HelloService Example 6 Attaching a Library to a Tool The following command adds the library jar file,HelloWorld_fr.jar (probably a French localized version of
the HelloTool's resources) to the bean, HelloWorld.client.HelloTool:/usr/sadm/bin/smcconf repository add library \
HelloWorld.client.HelloTool HelloWorld_fr.jar
Example 7 Attaching a Library to all Tools The following command adds the library jar file, widgets.jar, to all tools in the repository. The library probably contains a widget set that might be useful to any registered tools:/usr/sadm/bin/smcconf repository add library ALLTOOL widgets.jar
ENVIRONMENT VARIABLES See environ(5) for descriptions of the following environmentvariables that affect the execution of the smcconf command:
JAVA_HOME If you do not specify this environment vari-
able, your PATH is searched for a suitableSunOS 5.11 Last change: 11 Dec 2009 10
System Administration Commands smcconf(1M)
java. Otherwise, the /usr/j2se location is used. DISPLAY If you do not set this environment variable, set it to null, or set it to an X(7) display to which you are not authorized to connect, the Solaris Management Console starts in terminal mode instead of graphical mode. EXIT STATUS The following exit values are returned: 0 Successful completion. 1 An error occurred.ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | SUNWmc ||_____________________________|_____________________________|
SEE ALSO
smc(1M), smccompile(1M), smcregister(1M), attributes(5), environ(5) NOTES All standard shell quoting rules apply.Legacy applications (X-windows, command-line, and web-based
applications) are handled differently from "native" Solaris Management Console tools. Legacy tools are handled by an instantiation of a native Solaris Management Console tool, LegacyAppLauncher, which, through the toolbox, is given the necessary information to run the legacy application: path, options, and so forth. Thus, you do not register a legacy application into the repository as you would a nativeSolaris Management Console tool. Instead, legacy applica-
tions appear only in toolboxes.SunOS 5.11 Last change: 11 Dec 2009 11