Harold,
Looks fine. Thanks for the explanation.
John
On 07/ 5/11 09:12 AM, Harold Shaw wrote:
Hi John,
It doesn't. '%(<element>)s' is a literal string that is printed as
part of the error message. An example of the output configuration
file with an incomplete DHCP configuration is shown below. There are
a couple of reasons for doing this. The system admin can tell exactly
what information and format is required. Additionally, multiple
macros may be incomplete. I can change the format of the untranslated
items if desired.
# dhcpd.conf
#
# Configuration file for ISC dhcpd
# (created by installadm(1M))
#
# global option definitions, common to all subnets
option domain-name "%(domainname)s";
option domain-name-servers %(nameservers)s;
default-lease-time 900;
max-lease-time 86400;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;
# Set logging facility (accompanies setting in syslog.conf)
log-facility local7;
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.60 192.168.2.69;
.
.
.
On 07/ 5/11 09:53 AM, John Fischer wrote:
Harold,
That sounds fine. However, I am having problem parsing the code.
It has:
78 DHCP_ERR = fill(_("DHCP Conversion error - conversion continuing. Some "
79 "hand translation will be required. The untranslated items
"
80 "are tagged with '%(<element>)s' where element is the "
81 "description of the required value.\n"))
And then:
1665 if not cfg_error_found:
1666 print DHCP_ERR
1667 cfg_error_found = True
How does the macro mname get put into the printed message?
Shouldn't that be:
print DHCP_ERR % {"<element>":mname}
Or some such thing?
Thanks,
John
On 07/ 5/11 07:33 AM, Harold Shaw wrote:
John,
I was thinking about this over the break and thought that it might
be better to point out in the coversion error message that each
untranslated item was tagged in a way that made it easily
identifiable. The suggested output is:
DHCP Conversion error - conversion continuing. Some hand translation
will be required. The untranslated items are tagged with
'%(<element>)s' where element is the description of the required
value.
I have created a webrev with the changes. It is located at:
https://cr.opensolaris.org/action/browse/caiman/hshaw/7061635
The code change has been tested.
Harold
On 07/ 1/11 04:13 PM, John Fischer wrote:
Harold,
Yes. That would be helpful.
John
On 07/ 1/11 03:11 PM, Harold Shaw wrote:
Thanks, John. Do you mean include the name/description of the
macro as part of the output so that the system admin knows where
in the dhcp config file to look? If so, no problem.
Harold
On 07/ 1/11 03:12 PM, John Fischer wrote:
Harold,
Looks good. My only comment is that it might be nice to show the
macro
that failed each time the config_file.write() has an exception as
this will allow
the system administrator a better clue why the failure occurred
and what
might need hand translation.
Thanks,
John
On 07/ 1/11 12:42 PM, Harold Shaw wrote:
Code Review can be found at:
https://cr.opensolaris.org/action/browse/caiman/hshaw/7061636
On 07/ 1/11 01:40 PM, Harold Shaw wrote:
Please do a code review for the bugs listed below:
7061636 <http://monaco.us.oracle.com/detail.jsf?cr=7061636>
installadm-convert dhcp conversion traceback if clients specified
7061635 <http://monaco.us.oracle.com/detail.jsf?cr=7061635>
installadm-convert dhcp conversion needs to be hardened
7061620 <http://monaco.us.oracle.com/detail.jsf?cr=7061620>
installadm-convert should only say it's moving install.conf if it actually exists
The fix for the first two bugs has been tested on several different dhcp
configurations (some illegal). The last bug was tested on
a pre-ISIM system and verified that the message was displayed only for those
systems that had install.conf (SPARC) and that the file
had indeed been moved.
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss