Less known Solaris features: svccfg editprop
Sometimes small features are really helpful. Nevertheless they are often relatively unknown. One of the examples is
svccfg editprop (it’s in Solaris for quite a while know, but it got more comfortable by showing less information in the recent time, in earlier times the tool showed almost everything … useful or not).
Let’s assume you want to change the IP number of the DNS server. You could use the normal
svccfg –s dns/client setprop config/nameserver = net_address: 192.168.1.1 command. However sometimes you don’t know the correct property to change.
In my example the server starts with the following value for the name server property:
Of course, with the information i used in this command it’s faster to use the direct svccfg method shown before, however I just use it here to show you the effect of the following command.
Instead of using the command to change the property mentioned above, you can use
svccfg -s svc:/network/dns/client:default editprop . With this command you can change the properties of the SMF service
/network/dns/client. However you don’t have to memorize the properties. The command shows it to you and gives you a mechanism to alter the properties. It fires up an
vi (or whatever you’ve configured your
EDITOR environment variable) and displays the following data in it.
When you want to to change some properties just remove the
# of the line you want to change, change the value of the property and remove the
# in front of the last line containing
The file should look like that (i’m omitting the lines with double-#).
As soon as you savequit the editor, the SMF is updated and refreshed.
Really useful when you can’t remember the necessary magic incantations for SMF configuration via