Solaris smf not updating resolv conf
wordpress meta
title: 'Solaris SMF Not Updating resolv.conf'
date: '2013-07-15T12:39:50-05:00'
status: publish
permalink: /solaris-smf-not-updating-resolv-conf
author: admin
excerpt: ''
type: post
id: 400
category:
- Solaris
tag: []
post_format: []
title: 'Solaris SMF Not Updating resolv.conf'
date: '2013-07-15T12:39:50-05:00'
status: publish
permalink: /solaris-smf-not-updating-resolv-conf
author: admin
excerpt: ''
type: post
id: 400
category:
- Solaris
tag: []
post_format: []
I recently had an issue where the Solaris SMF did not want to update my /etc/resolv.conf file. Even though "svccfg -s network/dns/client listprop config" showed the entries for my DNS client correctly and also trying the export the SMF simply refused to update the resolv.conf. I dug around in the scripts a little bit and saw the "delcust" option. AFter clearing everything out I could add my entries back in SMF DNS client and resolv.conf automatically updated when doing a refresh.
Found the delcust line here:
root@t41:/lib/svc/method# more dns-client
...
'unconfigure')
# Permanently shutdown service
svcadm disable $SMF_FMRI
# Unroll any admin customization
svccfg -s svc:/network/dns/client delcust
...
Try deleting customization:
root@t41:/lib/svc/method# svccfg -s svc:/network/dns/client delcust
Deleting customizations for service: network/dns/client
root@t41:/lib/svc/method# svcs -a | grep dns/client
online 14:21:02 svc:/network/dns/client:default
root@t41:/lib/svc/method# svcadm disable svc:/network/dns/client
root@t41:/lib/svc/method# svcs -a | grep dns/client
disabled 14:17:40 svc:/network/dns/client:default
root@t41:/lib/svc/method# svccfg -s network/dns/client listprop config
config application
config/value_authorization astring solaris.smf.value.name-service.dns.client
Add values for DNS:
root@t41:/lib/svc/method# svccfg -s network/dns/client setprop config/nameserver = net_address: "(10.200.10.10)"
root@t41:/lib/svc/method# svccfg -s network/dns/client setprop config/domain = astring: domain1.com
root@t41:/lib/svc/method# svccfg -s network/dns/client setprop config/search = astring: '("domain1.com" "domain2.com")'
root@t41:/lib/svc/method# svccfg -s network/dns/client listprop config
config application
config/value_authorization astring solaris.smf.value.name-service.dns.client
config/nameserver net_address 10.200.10.10
config/domain astring domain1.com
config/search astring "domain1.com" "domain2.com"
root@t41:/lib/svc/method# svcadm refresh network/dns/client
root@t41:/lib/svc/method# more /etc/resolv.conf
...
domain domain1.com
search domain1.com domain2.com
nameserver 10.200.10.10
Check nsswitch also:
root@t41:/lib/svc/method# svccfg -s name-service/switch listprop config
config application
config/default astring files
config/value_authorization astring solaris.smf.value.name-service.switch
config/printer astring "user files"
config/host astring "files dns"
root@t41:/lib/svc/method# grep host /etc/nsswitch.conf
hosts: files dns