Less known Solaris features: svccfg editprop (ZT)
http://www.c0t0d0s0.org/archives/7675-Less-known-Solaris-features-svccfg-editprop.html
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:
root@template:~# svcprop svc:/network/dns/client:default | grep "config/nameserver"
config/nameserver net_address 192.168.1.2
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.
##
## Change property values by removing the leading '#' from the
## appropriate lines and editing the values. svccfg subcommands
## such as delprop can also be added to the script.
## ## Property group "config"
## The following properties are defined in the selected instance
## (svc:/network/dns/client:default) ##
## The value used to construct the "nameserver" directive in resolv.conf(4).
##
# setprop config/nameserver = net_address: 192.168.1.2 ## The following properties inherit from the parent service
## (svc:/network/dns/client) # setprop config/value_authorization = astring: solaris.smf.value.name-service.dns.client ## Uncomment to apply these changes to this instance.
# refresh
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 # refresh.
The file should look like that (i'm omitting the lines with double-#).
setprop config/nameserver = net_address: 192.168.1.1
# setprop config/value_authorization = astring: solaris.smf.value.name-service.dns.client
refresh
As soon as you savequit the editor, the SMF is updated and refreshed.
root@template:~# svcprop svc:/network/dns/client:default | grep "config/nameserver"
config/nameserver net_address 192.168.1.1
Really useful when you can't remember the necessary magic incantations for SMF configuration via setprop
Less known Solaris features: svccfg editprop (ZT)的更多相关文章
- Solaris Tips: Repairing the Boot Archive (ZT)
http://www.seedsofgenius.net/solaris/solaris-tips-repairing-the-boot-archive 注意以下是系统盘非镜像情况下的操作,如果系统盘 ...
- Unix/Linux环境C编程入门教程(1) Solaris 11 64bit环境搭建
Unix/Linux版本众多,我们推荐Unix/Linux初学者选用几款典型的Unix/Linux操作系统进行学习. 本文就带大家来安装Solaris 11 64位并且配置好C/C++开发环境 本文所 ...
- Unix/Linux周边环境C编程新手教程(1) Solaris 11 64bit环境结构
Unix/Linux许多的版本号.我们推荐Unix/Linux刚開始学习的人选用几款典型的Unix/Linux操作系统进行学习. 本文就带大家来安装Solaris 11 64位而且配置好C/C++开发 ...
- Solaris 11 配置IP地址
查看ipipadm show-addr 删除IP地址ipadm delete-addr net0/v4 配置IP地址ipadm create-addr –T static –a local=10.90 ...
- solaris下安装oracle 11g与11g rac
1.To Find Swap, RAM, and OS Version 对于 Solaris 操作系统,查看 Swap, RAM, and OS Version 的方法: swap -l /usr/s ...
- Solaris 11配置IPS安装系统包(类似linux中的yum源)
参考:http://blog.chinaunix.net/uid-8860-id-3777457.html 一. 概述: Solaris 11被称为第一个云操作系统,因此在很多方面体现了云系统的一些特 ...
- Configuring Transitive IPMP on Solaris 11
http://www.tokiwinter.com/configuring-transitive-ipmp-on-solaris-11/ We all know the pain of configu ...
- Solaris与Windows Active Directory集成
通过Solaris与Active Directory的集成,Solaris可以使用Windows 2003 R2/ 2008 Active Directory来进行用户登录验证.以下是简要配置过程. ...
- Java 8 New Features
What's New in JDK 8 https://www.oracle.com/technetwork/java/javase/8-whats-new-2157071.html Java Pla ...
随机推荐
- HBase-协处理器详解及实现
协处理器(coprocessor) 把一部分计算移动到数据的存放端. 实例:HBase添加solr二级索引详细代码 简介 协处理器允许用户在region服务器上运行自己的代码,允许用户执行region ...
- volatile的特性
volatile的特性 当我们声明共享变量为volatile后,对这个变量的读/写将会很特别.理解volatile特性的一个好方法是:把对volatile变量的单个读/写,看成是使用同一个监视器锁对这 ...
- js数字过大js自动变0
解决方案: <a onclick="checkDate(${item.billday},'${item.bankcard}',${item.limitmoney/100}) 加上引号变 ...
- 爬虫之MongoDB
一.简介 MongoDB是一款强大.灵活.且易于扩展的通用型数据库 1.易用性 MongoDB是一个面向文档(document-oriented)的数据库,而不是关系型数据库. 不采用关系型主要是为了 ...
- zeptojs的一些别人的博客
http://www.css88.com/doc/zeptojs/ http://blog.163.com/litianyichuanqi@126/blog/static/11597944120142 ...
- 在CentOS6.4中安装配置LAMP环境的详细步骤 - Leroy-LIZH
本文详细介绍了CentOS6.4系统中安装LAMP服务并对其进行配置的过程,即安装Apache+PHP+Mysql,参照了网上大神的设置,其他Linux发行系统可以参考~ 在本文中部分命令操作需要ro ...
- java:管道流(线程间管道流)
class Send implements Runnable{ PipedOutputStream pos = null; public Send() { this.pos = new PipedOu ...
- 使用 docker 拉取镜像和创建容器-nginx
本文主要分享通过从docker hub上获取nginx镜像 1.首先查找nginx镜像 [root@node1 ~]# docker search nginx NAME DESCRIPTION ST ...
- angularjs 简单指令
<!DOCTYPE html> <html data-ng-app="app"> <head> <title>angular js& ...
- 26 python 并发编程之多进程理论
一 什么是进程 进程:正在进行的一个过程或者说一个任务.而负责执行任务则是cpu. 举例(单核+多道,实现多个进程的并发执行): egon在一个时间段内有很多任务要做:python备课的任务,写书的任 ...