http://defect.opensolaris.org/bz/show_bug.cgi?id=12593



--- Comment #12 from Anurag S. Maskey <Anurag.Maskey at Sun.COM> 2009-12-10 
15:10:06 UTC ---
(In reply to comment #11)
> I found nwamcfg doesn't accept empty string for the nameservices-config-file
> property, and the default value is "/etc/nsswitch.dns" even on creating new
> location. Is it a bug?

Here is now nwamcfg deals with the nameservices-config-file property (with
example):

* If more than one nameservices is configured, then nameservices-config-file is
mandatory.  It cannot be cleared at all.

nwamcfg:loc:testloc> get nameservices
    nameservices        dns,nis

nwamcfg:loc:testloc> get nameservices-config-file
    nameservices-config-file    "/etc/nsswitch.nis"

nwamcfg:loc:testloc> clear nameservices-config-file
Clear error: entity is missing required member


* If only one nameservice is configured, then nameservices-config-file can be
cleared, *BUT* it will be automatically changed to the appropriate
/etc/nsswitch.* file.  The user can still change the property to point to any
file (all properties for files just have to be an absolute path, the actual
file does not have to exist).

nwamcfg:loc:testloc> get nameservices
    nameservices        dns,nis
nwamcfg:loc:testloc> get nameservices-config-file
    nameservices-config-file    "/etc/nsswitch.nis"

nwamcfg:loc:testloc> set nameservices=dns
nwamcfg:loc:testloc> get nameservices
    nameservices        dns

nwamcfg:loc:testloc> get nameservices-config-file
    nameservices-config-file    "/etc/nsswitch.nis"

nwamcfg:loc:testloc> clear nameservices-config-file

nwamcfg:loc:testloc> get nameservices-config-file
    nameservices-config-file    "/etc/nsswitch.dns"

     [nameservices-config-file has automatically changed to /etc/nsswitch.dns.  
     This is done during the validation of the properties.]

nwamcfg:loc:testloc> set nameservices-config-file=/etc/nsswitch.foo 
nwamcfg:loc:testloc> get nameservices-config-file
    nameservices-config-file    "/etc/nsswitch.foo"

-- 
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Reply via email to