Commit e1c0fae5 authored by Marco Mariani's avatar Marco Mariani

use explicit m// operator to allow later string replace

parent 39986b3f
......@@ -5204,7 +5204,7 @@ sub upgradeLdap($) {
print OUT "olcDatabase: {3}mdb\n";
next;
}
if ($_ =~ /^olcDbDirectory: \/opt\/zimbra\/data\/ldap\/hdb\/db/) {
if ($_ =~ m|^olcDbDirectory: /opt/zimbra/data/ldap/hdb/db|) {
print OUT "olcDbDirectory: /opt/zimbra/data/ldap/mdb/db\n";
next;
}
......@@ -5276,7 +5276,7 @@ sub upgradeLdap($) {
print OUT "olcDatabase: {2}mdb\n";
next;
}
if ($_ =~ /^olcDbDirectory: \/opt\/zimbra\/data\/ldap\/hdb\/db/) {
if ($_ =~ m|^olcDbDirectory: /opt/zimbra/data/ldap/hdb/db|) {
print OUT "olcDbDirectory: /opt/zimbra/data/ldap/mdb/db\n";
next;
}
......
......@@ -42,7 +42,7 @@ my $localxml = XMLin("/opt/zimbra/conf/localconfig.xml");
my $table = new Proc::ProcessTable;
foreach my $p ( @{$table->table} ) {
my ($pid,$ppid,$pgrp,$cmdline) = ($p->pid, $p->ppid, $p->pgrp, $p->cmndline);
if ($p->fname eq "mysqld" && $cmdline =~ /\/opt\/zimbra\/db/) {
if ($p->fname eq "mysqld" && $cmdline =~ m|/opt/zimbra/db|) {
#if ($p->fname eq "mysqld") {
addToReport("PID:$pid PPID:$ppid PGRP:$pgrp\nCMD:\t$cmdline\n\n")
if ($p->fname eq "mysqld" && $debug);
......
......@@ -66,8 +66,8 @@ sub get_pid_tree() {
if (open(CMDLINE, "<$PROCFS/$pid/cmdline")) { # else pid has gone away
while (my $line = <CMDLINE>) {
my @args = split('\0',$line);
$cmd = 'zmconfigd' if ($args[$#args] =~ /\/opt\/zimbra\/libexec\/zmconfigd/);
$cmd = 'zmmailboxd' if ($args[$#args] =~ /\/opt\/zimbra\/mailboxd\/etc\/jetty.xml/);
$cmd = 'zmconfigd' if ($args[$#args] =~ m|//opt/zimbra/libexec/zmconfigd|);
$cmd = 'zmmailboxd' if ($args[$#args] =~ m|/opt/zimbra/mailboxd/etc/jetty.xml|);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment