]> Frank Brehm's Git Trees - scripts/solaris.git/commitdiff
Bugfixing in regular expressions
authorFrank Brehm <frank@brehm-online.com>
Sun, 18 Dec 2016 19:03:29 +0000 (20:03 +0100)
committerFrank Brehm <frank@brehm-online.com>
Sun, 18 Dec 2016 19:03:29 +0000 (20:03 +0100)
LogRotate.pm

index 71a613d1a547136cf0abaf477f75f5933075a095..bff18487350aa362756d2842b6a0cafb2066c7f8 100644 (file)
@@ -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#^/#;