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 delcustDeleting customizations for service: network/dns/client
root@t41:/lib/svc/method# svcs -a | grep dns/clientonline 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/clientdisabled 14:17:40 svc:/network/dns/client:default
root@t41:/lib/svc/method# svccfg -s network/dns/client listprop configconfig applicationconfig/value_authorization astring solaris.smf.value.name-service.dns.clientAdd 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.comroot@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 configconfig applicationconfig/value_authorization astring solaris.smf.value.name-service.dns.clientconfig/nameserver net_address 10.200.10.10config/domain astring domain1.comconfig/search astring "domain1.com" "domain2.com"
root@t41:/lib/svc/method# svcadm refresh network/dns/clientroot@t41:/lib/svc/method# more /etc/resolv.conf...domain domain1.comsearch domain1.com domain2.comnameserver 10.200.10.10Check nsswitch also:
root@t41:/lib/svc/method# svccfg -s name-service/switch listprop configconfig applicationconfig/default astring filesconfig/value_authorization astring solaris.smf.value.name-service.switchconfig/printer astring "user files"config/host astring "files dns"
root@t41:/lib/svc/method# grep host /etc/nsswitch.confhosts: files dns