From: Don Armstrong Date: Sun, 8 Mar 2009 00:25:25 +0000 (+0000) Subject: * add missing semicolon X-Git-Url: https://git.donarmstrong.com/?p=bin.git;a=commitdiff_plain;h=91c7300e3fc1057404424f8a4bdd5ade18d78d3a * add missing semicolon --- diff --git a/update_dns_serial b/update_dns_serial index 72edce2..93a2b85 100755 --- a/update_dns_serial +++ b/update_dns_serial @@ -14,8 +14,8 @@ for my $file (@ARGV) { # rip out old serial my ($old_serial) = $fh_contents =~ /IN\s+SOA\s+\S+\s+\S+\s*(?:\s*\;.+\n)*\((?:\s*\;.+\n)*\s*(\d+)/; my ($ymd,$iter) = $old_serial =~ /(\d{4}\d{2}\d{2})(\d{2})/; - my $new_serial = strftime("%Y%m%d",gmtime)."01" - if ($ymd == strftime("%Y%m%d",gmtime)) { + my $new_serial = strftime("%Y%m%d",gmtime())."01"; + if ($ymd eq strftime("%Y%m%d",gmtime())) { $new_serial = $ymd.($iter+1); } $fh_contents =~ s/(IN\s+SOA\s+\S+\s+\S+\s*(?:\s*\;.+\n)*\((?:\s*\;.+\n)*\s*)(\d+)/${1}${new_serial}/;