Don't update mtime on shorewall.conf during update that doesn't change the file

Signed-off-by: Tom Eastep <teastep@mint14.(none)>
This commit is contained in:
Tom Eastep 2013-01-02 15:03:07 -08:00
parent f955abe18b
commit 90e0c8b717

View File

@ -4357,10 +4357,10 @@ EOF
if ( system( "diff -q $configfile $configfile.bak > /dev/null" ) ) {
progress_message3 "Configuration file $configfile updated - old file renamed $configfile.bak";
} else {
if ( unlink "$configfile.bak" ) {
if ( rename "$configfile.bak", $configfile ) {
progress_message3 "No update required to configuration file $configfile; $configfile.bak not saved";
} else {
warning_message "Unable to unlink $configfile.bak";
warning_message "Unable to rename $configfile.bak to $configfile";
progress_message3 "No update required to configuration file $configfile";
}