diff options
author | ivan <ivan> | 2005-10-16 14:59:54 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-10-16 14:59:54 +0000 |
commit | 9ae6837a642f9becaf99f69d7f1519ee720fc7fb (patch) | |
tree | d8c12207b0ca6788350aae285c8cee7c4d13d79e /bin | |
parent | 4750962f384c8061f4b5c78201a449b1f41c56c7 (diff) |
don't error out if there's no HEADER file, just produce a useable snippet anyway
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/bind.export | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/bind.export b/bin/bind.export index d0b93797e..9f4a50162 100755 --- a/bin/bind.export +++ b/bin/bind.export @@ -43,10 +43,12 @@ foreach my $export ( @exports ) { open(NAMED_CONF,">$prefix/named.conf") or die "can't open $prefix/named.conf: $!"; - open(CONF_HEADER,"<$prefix/named.conf.HEADER") - or die "can't open $prefix/named.conf.HEADER: $!"; - while (<CONF_HEADER>) { print NAMED_CONF $_; } - close CONF_HEADER; + if ( -e "$prefix/named.conf.HEADER" ) { + open(CONF_HEADER,"<$prefix/named.conf.HEADER") + or die "can't open $prefix/named.conf.HEADER: $!"; + while (<CONF_HEADER>) { print NAMED_CONF $_; } + close CONF_HEADER; + } my $zonepath = $export->option('zonepath'); $zonepath =~ s/\/$//; |