Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
System Administration Commandssmosservice(1M)


NAME

 smosservice - manage OS services

SYNOPSIS

 /usr/sadm/bin/smosservice subcommand [ auth_args] -- [subcommand_args]

DESCRIPTION

 

The smosservice command manages OS services.

smosservice subcommands are:

add
Adds the specified OS services.
delete
Deletes the specified OS services.
list
Either lists all the installed OS services for the server if you do not specify a hostname, or lists the OS services for the specified diskless client if you do specify a hostname.
patch
Manages patches on all existing diskless clients. For example, you can use this subcommand to initially establish a patch spool directory on an OS server. Then, you can apply the patch to the spool area, verifying the patch as needed. Once the patch exists in the spool area, you can apply the patch to the clone area. In addition, you can migrate the patched clone area to clients.

OPTIONS

 

The smosservice authentication arguments, auth_args, are derived from the smc(1M) arg set and are the same regardless of which subcommand you use. The smosservice command requires the Solaris Management Console to be initialized for the command to succeed (see smc(1M)). After rebooting the Solaris Management Console server, the first Solaris Management Console connection might time out, so you might need to retry the command.

The subcommand-specific options, subcommand_args, must come after the auth_args and must be separated from them by the -- option.

auth_args

 

The valid auth_args are -D, -H, -l, -p, -r, and -u; they are all optional. If no auth_args are specified, certain defaults will be assumed and the user may be prompted for additional information, such as a password for authentication purposes. These letter options can also be specified by their equivalent option words preceded by a double dash. For example, you can use either -D or --domain.

-D | --domain domain
Specifies the default domain that you want to manage. The syntax of domain is type:/host_name/domain_name, where type is nis, nis+, dns, ldap, or file; host_name is the name of the machine that serves the domain; and domain_name is the name of the domain you want to manage. (Note: Do not use nis+ for nisplus.)

If you do not specify this option, the Solaris Management Console assumes the file default domain on whatever server you choose to manage, meaning that changes are local to the server. Toolboxes can change the domain on a tool-by-tool basis; this option specifies the domain for all other tools.

-H | --hostname host_name:port
Specifies the host_name and port to which you want to connect. If you do not specify a port, the system connects to the default port, 898. If you do not specify host_name:port, the Solaris Management Console connects to the local host on port 898. You may still have to choose a toolbox to load into the console. To override this behavior, use the smc(1M) -B option, or set your console preferences to load a "home toolbox" by default.
-l | --rolepassword role_password
Specifies the password for the role_name. If you specify a role_name but do not specify a role_password, the system prompts you to supply a role_password. Passwords specified on the command line can be seen by any user on the system, hence this option is considered insecure.
-p | --password password
Specifies the password for the user_name. If you do not specify a password, the system prompts you for one. Passwords specified on the command line can be seen by any user on the system, hence this option is considered insecure.
-r | --rolename role_name
Specifies a role name for authentication. If you do not specify this option, no role is assumed.
-u | --username user_name
Specifies the user name for authentication. If you do not specify this option, the user identity running the console process is assumed.
--
This option is required and must always follow the preceding options. If you do not enter the preceding options, you must still enter the -- option.

subcommand_args

 

Note: Descriptions and other arg options that contain white spaces must be enclosed in double quotes.

  • For subcommand add:
    -h
    (Optional) Displays the command's usage statement.
    -o os_server
    (Optional) Specifies the name of the host where the OS service filesystems reside. If this option is not specified, the host will be the same as that specified in the smc(1M) -D option. This option is useful in the event that the name service server and the OS server are not the same machine.
    -x mediapath=path
    Specifies the full path to the Solaris CD image.
    -x platform=platform
    Specifies the OS service to add. The instruction architecture, machine class, OS, and version are given in the form:

    instruction_set.machine_class.Solaris_os_version

    for example, sparc.sun4m.Solaris_9
    -x cluster=cluster
    Specifies the Solaris cluster to install. For example, SUNWCall.
    -x locale=locale[locale, . . .]
    (Optional) Specifies the locales to install from the specified cluster. A comma-delimited list of locales can be specified.
  • For subcommand delete:
    -h
    (Optional) Displays the command's usage statement.
    -o os_server
    (Optional) Specifies the name of the host where the OS service filesystems reside. If this option is not specified, the host will be the same as that specified in the smc(1M) -D option. This option is useful in the event that the name service server and the OS server are not the same machine.
    -x rmplatform=platform
    Specifies the OS service to remove. The instruction architecture, machine class, OS, and version are given in the form:

    instruction_set.machine_class.Solaris_os_version

    for example, sparc.all.Solaris_9. Note: Only a machine class of all is supported.
  • For subcommand list:
    -h
    (Optional) Displays the command's usage statement.
    -o os_server
    (Optional) Specifies the name of the host where the OS service filesystems reside. If this option is not specified, the host will be the same as that specified in the smc(1M) -D option. This option is useful in the event that the name service server and the OS server are not the same machine.
  • For subcommand patch:
    -a patch_directory/patch_ID
    Adds the specified patch, patch_ID, to the spool directory. patch_directory specifies the source path of the patch to be spooled which includes the patchid directory name. Patches are spooled to /export/diskless/Patches/. If the patch being added obsoletes an existing patch in the spool, the obsolete patch is moved to the archive area, /export/diskless/Patches/Archive (to be restored if this new patch is ever removed).
    -h
    (Optional) Displays the command's usage statement.
    -m
    (Optional) Synchronizes spooled patches with offline copies of each diskless client OS service on the server. Spooled patches and applied patches are compared so that newly spooled patches can be installed and patches recently removed from the spool can be backed out. This option does not apply to patches directly to diskless client OS services or diskless clients; the -u option must be used to update the services and clients with the changes. Clients are not required to be down at this time, as all patching is done off line. Note: The server is fully available during this operation.
    -P
    Lists all currently spooled patches with an associated synopsis. The list is split up into sections detailing the patches for each OS and architecture in this format:
     
    
    Solaris os_rel1 architecture1:
    patchid Synopsis
    patchid Synopsis
    ......
    Solaris os_rel1 architecture2:
    patchid Synopsis
    ......
    
    -r patchid
    Removes the specified patchid from the spool if it is not a requirement for any of the other patches in the spool. All archived patches that were obsoleted by the removed patch are restored to the spool.
    -U
    (Optional) Updates all diskless client OS services and diskless clients with any changes after synchronizing patches with the -m option. Clients must be brought down during this operation. Once execution has completed, each client should be booted again.

EXAMPLES

 Example 1. Creating a new OS service
 

The following command adds an OS service for Solaris 9 for the sun4u machine class where the OS server is not using a name service:
 
example% /usr/sadm/bin/smosservice add -- \
            -x mediapath=/net/imageserver/5.8/sparc \
            -x platform=sparc.sun4u.Solaris_9 \
            -x cluster=SUNWCXall -x locale=en_US

The following command adds an OS service for Solaris 9 for the sun4u machine class where the OS server is using NIS, the NIS server is nisserver, the OS server is osserver, and the port to which you connect on osserver is 898:
 
example% 
/usr/sadm/bin/smosservice add -D nis:/nisserver/my.domain.com -- \
            -H osserver:898 -- \
            -x mediapath=/net/imageserver/5.8/sparc \
            -x platform=sparc.sun4u.Solaris_9 \
            -x cluster=SUNWCXall -x locale=en_US \
            -o osserver

In the preceding example, the OS service is placed in /export on osserver, while the hosts.byaddr, ethers, and bootparams maps are updated on the NIS server.

Example 2. Deleting an OS service
 

The following command deletes the OS service for Solaris 9 for the sun4u machine class where the OS server is using NIS, the NIS server is nisserver, and the OS server is osserver:
 
example% /usr/sadm/bin/smosservice delete\
            -D nis:/nisserver/my.domain.com -- \
            -x rmplatform=sparc.all.Solaris_9 \
            -o osserver

Example 3. Listing installed OS services
 

The following command lists the OS services installed on the machine, osserver:
 
example% /usr/sadm/bin/smosservice list \
            -D file:/osserver/osserver -- -o osserver

ENVIRONMENT VARIABLES

 

See environ(5) for a description of the JAVA_HOME environment variable, which affects the execution of the smosservice command. If this environment variable is not specified, the /usr/java1.2 location is used. See smc(1M).

EXIT STATUS

 

The following exit values are returned:

0
Successful completion.
1
Invalid command syntax. A usage message displays.
2
An error occurred while executing the command. An error message displays.

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
AvailabilitySUNWdclnt

SEE ALSO

 

smc(1M), smdiskless(1M), attributes(5), environ(5)


SunOS 5.9Go To TopLast Changed 19 Dec 2001

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.