Managing System Services in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Modifying Services that are Configured by a File

A few SMF services that are not managed by inetd get some of their configuration from a file rather than from service properties. To modify this configuration, edit the configuration file and use SMF commands to restart the service. These configuration files can be changed while the service is running, but the content of the files is only read when the service is started.

Before you edit a configuration file directly, check the following conditions:

  • Make sure the configuration file does not contain a message telling you not to directly edit it.

  • Make sure the service does not have a property group of type configfile.

    $ svcprop -g configfile network/ntp

    If the service has a property group of type configfile, modify the properties in those property groups and not the configuration file. See Using a Stencil to Create a Configuration File.

For example, to add a new NTP server to support your NTP clients, add a new entry for the server to the /etc/inet/ntp.conf file and then restart the NTP service as shown in the following command:

$ svcadm restart svc:/network/ntp:default

To enable IKEv2, modify the /etc/inet/ike/ikev2.config file to configure the IKEv2 daemon, and then enable the IKEv2 service as shown in the following command. To edit the ikev2.config file, use the pfedit command as a user who is assigned the Network IPsec Management profile. Editing the file in this way preserves the correct file ownership. See the pfedit (1M) man page for information about using pfedit.

$ svcadm enable svc:/network/ipsec/ike:ikev2