--- a/update-serial.pl Fri Nov 05 16:16:13 2010 +0100
+++ b/update-serial.pl Fri Nov 05 16:22:58 2010 +0100
@@ -24,7 +24,7 @@
use Pod::Usage;
#my $dnssec_sign = "../dnstools/dnssec-sign";
-my $ME = basename $0;
+my $ME = basename $0;
my $VERSION = '__VERSION__';
my $master_dir = "/etc/bind/master";
@@ -33,7 +33,8 @@
my $opt_dnssec = 0;
{
- # remove temporary files
+
+ # remove temporary files
my @cleanup;
sub cleanup(@) {
@@ -50,12 +51,18 @@
MAIN: {
GetOptions(
- "v|verbose!" => \$opt_verbose,
+ "v|verbose!" => \$opt_verbose,
"y|r|yes|reload!" => \$opt_reload,
- "dnssec!" => \$opt_dnssec,
- "h|help" => sub { pod2usage(-exit => 0, -verbose => 1) },
- "m|man" => sub { pod2usage(-noperldoc => system(perldoc => "-V"), -exit => 0, -verbose => 2) },
- "version" => sub { print "$0 $VERSION\n"; exit 0; },
+ "dnssec!" => \$opt_dnssec,
+ "h|help" => sub { pod2usage(-exit => 0, -verbose => 1) },
+ "m|man" => sub {
+ pod2usage(
+ -noperldoc => system("perldoc -V &>/dev/null"),
+ -exit => 0,
+ -verbose => 2
+ );
+ },
+ "version" => sub { print "$0 $VERSION\n"; exit 0; },
) or pod2usage();
warn "DNSSEC support is currently disabled!\n"
@@ -114,9 +121,9 @@
seek($in, 0, 0) or die "Can't seek in $file: $!\n";
truncate($in, 0) or die "Can't truncate $file: $!\n";
print $in $_;
- close($in);
+ close($in);
- # touch the stamp
+ # touch the stamp
open(my $out, ">$stamp_file");
close($out);