add logpath
This commit is contained in:
parent
2a542e78b3
commit
d0d6b694c7
17
98_backup.pm
17
98_backup.pm
@ -104,7 +104,7 @@ sub CommandBackup($$) {
|
|||||||
$ret = readModpath( $modpath, $backupdir );
|
$ret = readModpath( $modpath, $backupdir );
|
||||||
|
|
||||||
## add all logfile path to pathname array
|
## add all logfile path to pathname array
|
||||||
$ret = addLogPathToPathnameArray($modpath);
|
$ret = addLogPathToPathnameArray();
|
||||||
|
|
||||||
### remove double entries from pathname array
|
### remove double entries from pathname array
|
||||||
my %all=();
|
my %all=();
|
||||||
@ -298,20 +298,25 @@ sub createArchiv($$$) {
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub addLogPathToPathnameArray($) {
|
sub addLogPathToPathnameArray() {
|
||||||
my $modpath = shift;
|
# my $modpath = shift;
|
||||||
|
|
||||||
my $ret;
|
my $ret;
|
||||||
my @logpathname;
|
my @logpathname;
|
||||||
my $extlogpath;
|
my $extlogpath;
|
||||||
|
|
||||||
|
Log( 4, 'addLogPathToPathnameArray' );
|
||||||
|
|
||||||
foreach my $logFile (devspec2array('TYPE=FileLog')) {
|
foreach my $logFile (devspec2array('TYPE=FileLog')) {
|
||||||
my $logpath = InternalVal($logFile,'logfile','');
|
Log( 5, 'found logFiles: ' . $logFile );
|
||||||
if ( $logpath =~ m#^(.+?)\/[\w]+\.log$# ) {
|
my $logpath = InternalVal($logFile,'currentlogfile','');
|
||||||
|
Log( 4, 'found logpath: ' . $logpath );
|
||||||
|
if ( $logpath =~ m#^(.+?)\/[\_|\-|\w]+\.log$# ) {
|
||||||
$extlogpath = $1;
|
$extlogpath = $1;
|
||||||
|
Log( 4, 'found extlogpath: ' . $extlogpath );
|
||||||
if ( $1 =~ /^\/[A-Za-z]/ ) {
|
if ( $1 =~ /^\/[A-Za-z]/ ) {
|
||||||
push( @logpathname, $extlogpath ) ;
|
push( @logpathname, $extlogpath ) ;
|
||||||
Log( 2, 'external logpath include: ' . $extlogpath );
|
Log( 4, 'external logpath include: ' . $extlogpath );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user