saving the statefile before an update
git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@2180 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
3
CHANGED
3
CHANGED
@@ -19,6 +19,9 @@
|
||||
- change: FHEMWEB added "Associated with" to detail-screen (Uli)
|
||||
- change: FHEMWEB added ETag headers (Matthias)
|
||||
- change: FHEMWEB devStateIcon added
|
||||
- change: 98_update.pm due a (probable) bug in perl, modules are no longer
|
||||
loading automatically. A restart is required now! (M. Fischer)
|
||||
- feature: 98_update.pm saves the statefile before an update (M. Fischer)
|
||||
|
||||
- 2012-10-28 (5.3)
|
||||
- feature: added functions trim, ltrim, rtrim, UntoggleDirect,
|
||||
|
||||
@@ -168,6 +168,17 @@ update_DoUpdate(@)
|
||||
$ret = $checkUpdates;
|
||||
}
|
||||
|
||||
# save statefile
|
||||
$ret .= "\nSaving statefile: ";
|
||||
my $cmdret = WriteStatefile();
|
||||
if (!$cmdret) {
|
||||
Log 1, "update saving statefile";
|
||||
$ret .= "done\n\n";
|
||||
} else {
|
||||
Log 1, "update statefile: $cmdret";
|
||||
$ret .= "Something went wrong with statefile:\n$cmdret\n\n";
|
||||
}
|
||||
|
||||
# do a backup first
|
||||
my $doBackup = (!defined($attr{global}{backup_before_update}) ? 1 : $attr{global}{backup_before_update});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user