On Nov 15, 2007 4:04 AM, Zoram Thanga <[EMAIL PROTECTED]> wrote: > Hi All, > > I'd like to automate system identification for a zone when it is freshly > installed. In most cases, I'd like to keep the same settings for domain > name, name service, security policy, etc., as in the global zone.
It sounds like simply copying in whole or part the relevant files from the global zone and making the appropriate modifications to $zonepath/root/etc/.sysid* (forget the exact file name) would be a workable approach. This would have to be done from the global zone. > > I'm wondering if there are (C) library interfaces to determine which > name service is used in the global zone, so that I can make the > following entry in the zone's /etc/sysidcfg file: To the best of my knowledge, such an API is not even available to query in the same zone (e.g. global zone querying global zone). Such an API that allowed cross-zone queries of this information would cross isolation boundaries that have been held rather dear with zones. > name_service=<service>{<service specific parameters>} > > So, I'd like do something like: > > name_service = get_name_service() > > if (name_service is NIS) { > /* get domain name */ > /* get yp master */ > } else if (name_service is NIS+) { > /* get NIS+ details */ > } else if (name_service is LDAP) { > /* get LDAP details */ > } else if (name_service is DNS) { > /* get DNS details */ > } ... This approach, much like the one used by sysidconfig, is broken. What happens when you use LDAP for everything except hosts and DNS for hosts? If you are coming up with a new solution for setting up naming services, please don't repeat this mistake. You may want to take a look at zonemgr. It will do quite a bit of customization of a zone without interaction and may be just what you are looking for. -- Mike Gerdts http://mgerdts.blogspot.com/ _______________________________________________ zones-discuss mailing list zones-discuss@opensolaris.org