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 ...
随机推荐
- 【转】meta标签中的http-equiv属性使用介绍
meta是html语言head区的一个辅助性标签.也许你认为这些代码可有可无.其实如果你能够用好meta标签,会给你带来意想不到的效果,meta标签的作用有:搜索引擎优化(SEO),定义页面使用语言, ...
- .gitignore 无效
利用.gitignore过滤文件,如编译过程中的中间文件,等等,这些文件不需要被追踪管理. 现象: 在.gitignore添加file1文件,以过滤该文件,但是通过Git status查看仍显示fil ...
- css3实现六边形
实现原理:这个效果的主要css样式有:1.>transform: rotate(120deg); 图片旋转2.>overflow:hidden; 超出隐藏3.>visibility: ...
- js的set和get
'use strict' class Student { constructor(_name,age){ this.name = _name; this.age = age; } set name(_ ...
- Node的异步I/O
node是单线程非阻塞异步I/O的模式. 阻塞I/O:完成整个数据获取的过程: 非阻塞I/O:不带数据,直接立即返回,要获取数据,还需通过文件描述符再次读取. node完成整个异步I/O的有事件循环. ...
- 解决:Eclipse安装Pydev插件报错: An error occurred while collecting items to be installed session context was:(profile=...
今天在Elipse上安装Pydev插件时报错: An error occurred while collecting items to be installed session context was ...
- uva 1025 A Spy int the Metro
https://vjudge.net/problem/UVA-1025 看见spy忍俊不禁的想起省赛时不知道spy啥意思 ( >_< f[i][j]表示i时刻处于j站所需的最少等待时间,有 ...
- vue项目打包注意的地方
打包有两种方式: 第一种方式:1.更改config文件夹下prod.env.js下的地址: 2.将config文件夹下index.js中build下改为 assetsPublicPath: '', 第 ...
- vue项目接口地址的定义
对于接口地址域名我们经常会遇到,那么如何去定义呢: 只要在config/dev.env.js中定义变量NODE_ENV就行啦 在.vue文件中的引用方式如下: 嗯,就是这样简单~~~~
- JS将数字转换成三位逗号分隔的样式
function formatNum(num) { if(!/^(\+|-)?(\d+)(\.\d+)?$/.test(num)){alert("wrong!"); return ...