sysconfig - unconfigure or reconfigure a Solaris instance
/usr/sbin/sysconfig
/usr/sbin/sysconfig configure | reconfigure [ -s] [-c config_profile.xml | dir] [--destructive] [-g grouping,grouping]
/usr/sbin/sysconfig unconfigure [-s] [ --destructive] [-g grouping,grouping ]
/usr/sbin/sysconfig unconfigure [-s] [ -g system] [--destructive] --remove-profiles
/usr/sbin/sysconfig create-profile [-o output_directory] [-l logfile] [-v verbosity] [-b] [ -g grouping,grouping]
The sysconfig utility is the interface for unconfiguring and reconfiguring a Solaris instance. A Solaris instance is defined as a boot environment in either a global or a non-global zone. Users are able to unconfigure particular, predefined subsystems. The subsystems of a system that are configurable are referred to as functional groupings. A functional grouping is a service or collection of services that are configured or unconfigured when the utility is executed.
There are three operations that are performed using the sysconfig utility: unconfiguration, configuration, and profile creation.
When sysconfig is called with the unconfigure subcommand, the system is unconfigured and left in an unconfigured state.
System configuration can occur either interactively or non-interactively. If the configure sub-command is invoked without a profile, the system is unconfigured immediately and an interactive interface is activated at the console that walks the user through the system configuration process. If the configure subcommand is invoked with a profile, then the configuration reads the profile and the configuration occurs non-interactively. The result in either case is a new configuration for the requested functional grouping.
Configuration and reconfiguration are synonymous. The reconfigure subcommand is an alias for the configure subcommand.
The sysconfig command can also be used to generate a configuration profile using the create-profile subcommand. The resulting profile is used with the sysconfig configure subcommand to configure functional groupings non-interactively. Valid profile names include an .xml extension.
Configuration of a system can be performed either interactively, using the System Configuration Interactive (SCI) Tool, or non-interactively, using a system configuration profile.
The SCI tool configures the target system in an interactive way using a text user interface. It can also be used to collect information generated by the user that describes the desired configuration of the target system. The tool then generates a system configuration profile containing the desired system configuration.
The SCI tool supports configuration of freshly installed or unconfigured systems. It is designed to provide system configuration for newly created non-global zones and during text installation. If there is a need to modify the configuration of an already configured system utilizing SCI tool, such a system has to be unconfigured first before SCI tool can run.
Besides using sysconfig to perform system configurations, individual functional groupings can be reconfigured and unconfigured. The functional groupings that can be configured on a system are network, naming_services, location, users, identity, support, and keyboard. The system grouping will configure or unconfigure all functional groupings. Groupings can also be unconfigured and left in an unconfigured state. The default values for unconfigured groupings are shown below.
The following groupings are configurable.
Grouping | Components | Unconfigured Stat ------------------------------------------------------------ identity | system nodename | unknown ------------------------------------------------------------ keyboard | Keyboard | U.S. English ------------------------------------------------------------ naming_services | DNS, NIS and LDAP | No network naming | clients, nsswitch | services ------------------------------------------------------------ network | network | No network ------------------------------------------------------------ location | timezone | UTC | locale | C locale ------------------------------------------------------------ support | ASR | ASR disabled ------------------------------------------------------------ system | all groupings | all groupings | | unconfigured ------------------------------------------------------------ users | root | Empty root password | initial user account | Remove user account ------------------------------------------------------------
The sysconfig utility makes use of the Solaris Management Facility (SMF) to centralize configuration information. The data generated by a system configuration operation is an administrative customization to the SMF repository stored by default at the sysconfig-profile layer of the SMF repository. When sysconfig configure -c <dir> is used, individual profiles can be applied at the enterprise-profile, site-profile, and node-profile SMF layers by placing those profiles in the appropriate subdirectory within dir: <dir>/enterprise, <dir>/site, and <dir>/node.
When sysconfig is used to configure the system, any values present in the admin layer that mask values set by sysconfig are removed. This applies only to the values that may be configured by using interactive mode.
This section describes supported subcommands and their associated options.
Unconfigure a system and leave it in the unconfigured state.
Shut the system down after the unconfiguration completes.
The grouping to unconfigure. If –g is not specified, all groupings will be unconfigured, resulting in a system unconfiguration. If –g system is specified, the user will be queried for confirmation before system unconfiguration occurs.
Do not preserve system data that is normally preserved during unconfiguration. By specifying this flag, the user indicates to any groupings unconfigured that data they would ordinarily preserve might be deleted.
This option is only valid with the unconfigure subcommand.
This flag will unconfigure the system and remove configuration data from the SMF enterprise-profile, site-profile, node-profile, sysconfig-profile, and admin layers. Profiles installed by a package will not be removed. This effectively returns the system to the original system configuration state that was delivered by the installers.
Any unpackaged profiles stored in the /etc/svc/profile/enterprise, /etc/svc/profile/site, /etc/svc/profile/node, and /etc/svc/profile/sysconfig directory will be removed as part of the process. Administrative customizations at the admin layer will be deleted.
Because this action is extensive, the removed XML profiles will be archived in a tar file named profiles-<timestamp>.tar in the /etc/svc/profile/backup directory.
This option is only valid with the system grouping. Using –g system is optional when calling this option.
Configure or reconfigure a grouping. The configure subcommand has access to the same options as the unconfigure subcommand. It also includes the following additional option.
Provides a profile or a directory of profiles to apply during configuration. If a profile is applied, the configuration step occurs non-interactively. If no profile is provided, the interactive system configuration tool is used for the configuration of the grouping.
All profiles must have an .xml file extension.
If you supply a directory to –c, all profiles in that directory must be valid (correctly formed) configuration profiles.
Run the SCI tool and create a system configuration profile. The default location for the profile is /system/volatile/profile/sc_profile.xml . The configuration generated is not applied to the system.
Replace the default profile location with output_directory for the configuration profile. A sc_profile.xml file will be created under this directory.
Location of the log file. The default is /var/tmp/install/sysconfig.log
Verbosity level, one of error, warn, info, debug, or input. These are in order of increasing verbosity, from least to most. The default is info.
Black-and-white version of SCI tool.
The following command unconfigures the system and leaves it in an unconfigured state. By default, if no grouping is specified, the groupings for the whole system are unconfigured.
# sysconfig unconfigure -sExample 2 Unconfiguring the System
The following command unconfigures the system and leaves the system unconfigured.
# sysconfig unconfigure -g systemExample 3 Reconfiguring System Using SCI Tool
The following command brings up the SCI Tool to reconfigure a system.
# sysconfig configureExample 4 Reconfiguring Using a Profile
The following command reconfigures a system using a profile.
# sysconfig configure -c some_profile.xmlExample 5 Creating and Using a Profile
The following sequence of commands creates a profile, then uses it to reconfigure a system.
# sysconfig create-profile -o /tmp/my_sysconfig_directory/ # sysconfig configure -g system -c /tmp/my_sysconfig_directory/sc_profile.xmlExample 6 Configuring the System in a Zone
The following command configures the system in a zone.
# zlogin ZONENAME root@ZONENAME# sysconfig configure -g systemExample 7 Interactively Configuring Functional Groupings
The following command reconfigures the network and naming services functional groupings. The SCI Tool is invoked and the groupings will be reconfigured interactively.
# sysconfig configure -g network,naming_servicesExample 8 Configuring Functional Groupings Non-interactively
The following sequence of commands creates a profile for the network and naming services, then uses the profile to reconfigure the groupings non-interactively.
# sysconfig create-profile -g network,naming_services \ -o /tmp/my_sysconfig_directory/ # sysconfig configure -g network,naming_services \ -c /tmp/my_sysconfig_directory/sc_profile.xmlExample 9 Unconfigure a System and Reverting the Groupings
The following command unconfigures a system and reverts the groupings to the default installed state.
# sysconfigure unconfigure --include-site-profile
Success.
Failure.
See attributes(7) for descriptions of the following attributes:
|
svcprop(1), attributes(7), attributes(7), svcadm(8), svccfg(8)