On Tue, Nov 28, 2006 at 06:18:16PM -0500, Sam Varshavchik wrote:
Timothy Lee Roden writes:
Hello again,
I'm far from fluent in PERL; however, this seems to work:
diro@asche% diff sv-make_timezonelist.pl new_sv-make_timezonelist.pl
Do it again, this time with the -U 3 option.
diro@asche% diff -U 3 sv-make_timezonelist.pl new_sv-make_timezonelist.pl
--- sv-make_timezonelist.pl 2005-05-06 16:20:49.000000000 +0000
+++ new_sv-make_timezonelist.pl 2006-11-28 19:38:04.000000000 +0000
@@ -55,6 +55,10 @@
{
$iso3166tab = "/usr/share/misc/iso3166";
}
+elsif ( $^O eq "netbsd" )
+{
+ $iso3166tab = "/usr/share/misc/domains"
+}
else
{
$iso3166tab = "$zoneinfo_dir/iso3166.tab";
@@ -90,8 +94,17 @@
# Correct the entry for GB.
$countries{GB} = 'United Kingdom';
-open(ZONES, $zonetab) ||
- die "Could not open '$zonetab' for reading ($!)\n";
+if ( open(ZONES, $zonetab) == 0 )
+{
+ if ( $^O eq "netbsd" )
+ {
+ die "Could not open '$zonetab' for reading ($!). Currently, NetBSD does not
install zone.tab by default. You must manually fetch sharesrc.tgz from the
source of your version and extract zone.tab into /usr/share/zoneinfo\n";
+ }
+ else
+ {
+ die "Could not open '$zonetab' for reading ($!)\n";
+ }
+}
@lines = <ZONES>;
close(ZONES);
!tr