From: Frank Brehm Date: Sun, 18 Dec 2016 19:03:29 +0000 (+0100) Subject: Bugfixing in regular expressions X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=d72a450d985e87734dd9155c23f0dc99d882ac52;p=scripts%2Fsolaris.git Bugfixing in regular expressions --- diff --git a/LogRotate.pm b/LogRotate.pm index 71a613d..bff1848 100644 --- a/LogRotate.pm +++ b/LogRotate.pm @@ -390,34 +390,34 @@ sub collect_old_logfiles($$) { $olddir = $f->{'olddir'}{'dirname'}; # Verzeichnisname ... - $olddir =~ s/(?:\${dirname}|\$dirname(?![a-zA-Z0-9_]))/$dir/g; + $olddir =~ s/(?:\$\{dirname\}|\$dirname(?![a-zA-Z0-9_]))/$dir/g; # Basename ... - $olddir =~ s/(?:\${basename}|\$basename(?![a-zA-Z0-9_]))/$basename/g; + $olddir =~ s/(?:\$\{basename\}|\$basename(?![a-zA-Z0-9_]))/$basename/g; # Nodename $t = $self->{'template'}{'nodename'}; - $olddir =~ s/(?:\${nodename}|\$nodename(?![a-zA-Z0-9_]))/$t/g; + $olddir =~ s/(?:\$\{nodename\}|\$nodename(?![a-zA-Z0-9_]))/$t/g; # Domain $t = $self->{'template'}{'domain'}; - $olddir =~ s/(?:\${domain}|\$domain(?![a-zA-Z0-9_]))/$t/g; + $olddir =~ s/(?:\$\{domain\}|\$domain(?![a-zA-Z0-9_]))/$t/g; # Platform $t = $self->{'template'}{'platform'}; - $olddir =~ s/(?:\${platform}|\$platform(?![a-zA-Z0-9_]))/$t/g; + $olddir =~ s/(?:\$\{platform\}|\$platform(?![a-zA-Z0-9_]))/$t/g; # Isa $t = $self->{'template'}{'isa'}; - $olddir =~ s/(?:\${isa}|\$isa(?![a-zA-Z0-9_]))/$t/g; + $olddir =~ s/(?:\$\{isa\}|\$isa(?![a-zA-Z0-9_]))/$t/g; # Release $t = $self->{'template'}{'release'}; - $olddir =~ s/(?:\${release}|\$release(?![a-zA-Z0-9_]))/$t/g; + $olddir =~ s/(?:\$\{release\}|\$release(?![a-zA-Z0-9_]))/$t/g; # Machine $t = $self->{'template'}{'machine'}; - $olddir =~ s/(?:\${machine}|\$machine(?![a-zA-Z0-9_]))/$t/g; + $olddir =~ s/(?:\$\{machine\}|\$machine(?![a-zA-Z0-9_]))/$t/g; $olddir = $dir . "/" . $olddir unless $olddir =~ m#^/#; @@ -945,34 +945,34 @@ sub create_olddir($$) { } # Verzeichnisname ... - $olddir =~ s/(?:\${dirname}|\$dirname(?![a-zA-Z0-9_]))/$dir/g; + $olddir =~ s/(?:\$\{dirname\}|\$dirname(?![a-zA-Z0-9_]))/$dir/g; # Basename ... - $olddir =~ s/(?:\${basename}|\$basename(?![a-zA-Z0-9_]))/$basename/g; + $olddir =~ s/(?:\$\{basename\}|\$basename(?![a-zA-Z0-9_]))/$basename/g; # Nodename $t = $self->{'template'}{'nodename'}; - $olddir =~ s/(?:\${nodename}|\$nodename(?![a-zA-Z0-9_]))/$t/g; + $olddir =~ s/(?:\$\{nodename\}|\$nodename(?![a-zA-Z0-9_]))/$t/g; # Domain $t = $self->{'template'}{'domain'}; - $olddir =~ s/(?:\${domain}|\$domain(?![a-zA-Z0-9_]))/$t/g; + $olddir =~ s/(?:\$\{domain\}|\$domain(?![a-zA-Z0-9_]))/$t/g; # Platform $t = $self->{'template'}{'platform'}; - $olddir =~ s/(?:\${platform}|\$platform(?![a-zA-Z0-9_]))/$t/g; + $olddir =~ s/(?:\$\{platform\}|\$platform(?![a-zA-Z0-9_]))/$t/g; # Isa $t = $self->{'template'}{'isa'}; - $olddir =~ s/(?:\${isa}|\$isa(?![a-zA-Z0-9_]))/$t/g; + $olddir =~ s/(?:\$\{isa\}|\$isa(?![a-zA-Z0-9_]))/$t/g; # Release $t = $self->{'template'}{'release'}; - $olddir =~ s/(?:\${release}|\$release(?![a-zA-Z0-9_]))/$t/g; + $olddir =~ s/(?:\$\{release\}|\$release(?![a-zA-Z0-9_]))/$t/g; # Machine $t = $self->{'template'}{'machine'}; - $olddir =~ s/(?:\${machine}|\$machine(?![a-zA-Z0-9_]))/$t/g; + $olddir =~ s/(?:\$\{machine\}|\$machine(?![a-zA-Z0-9_]))/$t/g; $olddir = $dir . "/" . $olddir unless $olddir =~ m#^/#;