mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
98_update.pm: updateNoFileCHeck attribute added (Forum #37118)
git-svn-id: https://svn.fhem.de/fhem/trunk@8574 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
35e59ecb69
commit
adf536f1e5
@ -160,6 +160,7 @@ doUpdate($$)
|
||||
}
|
||||
|
||||
my @excl = split(" ", AttrVal("global", "exclude_from_update", ""));
|
||||
my $noSzCheck = AttrVal("global", "updateNoFileCheck", configDBUsed());
|
||||
|
||||
my @rl = upd_getChanges($root, $basePath);
|
||||
###########################
|
||||
@ -211,17 +212,23 @@ doUpdate($$)
|
||||
next;
|
||||
}
|
||||
|
||||
my $sz = -s $fPath;
|
||||
next if($isExcl || ($fileOk && defined($sz) && $sz eq $r[2]));
|
||||
if($noSzCheck) {
|
||||
next if($isExcl || $fileOk);
|
||||
|
||||
} else {
|
||||
my $sz = -s $fPath;
|
||||
next if($isExcl || ($fileOk && defined($sz) && $sz eq $r[2]));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$needJoin = 1 if($fName =~ m/commandref_frame/ || $fName =~ m/\d+.*.pm/);
|
||||
next if($fName =~ m/commandref.*html/ && $fName !~ m/frame/ && $canJoin);
|
||||
|
||||
uLog 1, "List of new / modified files since last update:"
|
||||
if($arg eq "check" && $nChanged == 0);
|
||||
|
||||
$needJoin = 1 if($fName =~ m/commandref_frame/ || $fName =~ m/\d+.*.pm/);
|
||||
next if($fName =~ m/commandref.*html/ && $fName !~ m/frame/ && $canJoin);
|
||||
$nChanged++;
|
||||
|
||||
uLog 1, "$r[0] $fName";
|
||||
next if($arg eq "check");
|
||||
|
||||
@ -526,6 +533,13 @@ upd_initRestoreDirs($)
|
||||
Monitor.
|
||||
</li><br>
|
||||
|
||||
<a name="updateNoFileCheck"></a>
|
||||
<li>updateNoFileCheck<br>
|
||||
If set, the command won't compare the local file size with the expected
|
||||
size. This attribute was introduced to satisfy some experienced FHEM
|
||||
user, its default value is 0.
|
||||
</li><br>
|
||||
|
||||
<a name="backup_before_update"></a>
|
||||
<li>backup_before_update<br>
|
||||
If this attribute is set, an update will back up your complete
|
||||
@ -615,6 +629,14 @@ upd_initRestoreDirs($)
|
||||
das Event Monitor aktiviert.
|
||||
</li><br>
|
||||
|
||||
<a name="updateNoFileCheck"></a>
|
||||
<li>updateNoFileCheck<br>
|
||||
Wenn dieses Attribut gesetzt ist, wird die Größe der bereits
|
||||
vorhandenen, lokalen Datei nicht mit der Sollgröße
|
||||
verglichen. Dieses Attribut wurde nach nicht genau spezifizierten Wnsch
|
||||
erfahrener FHEM Benutzer eingefuehrt, die Voreinstellung ist 0.
|
||||
</li><br>
|
||||
|
||||
<a name="backup_before_update"></a>
|
||||
<li>backup_before_update<br>
|
||||
Wenn dieses Attribut gesetzt ist, erstellt FHEM eine Sicherheitskopie
|
||||
|
@ -284,6 +284,7 @@ my @globalAttrList = qw(
|
||||
title
|
||||
uniqueID
|
||||
updateInBackground:1,0
|
||||
updateNoFileCheck:1,0
|
||||
version
|
||||
);
|
||||
use warnings 'qw';
|
||||
|
Loading…
Reference in New Issue
Block a user