mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-20 05:11:03 +01:00
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:
parent
f955abe18b
commit
90e0c8b717
@ -4357,10 +4357,10 @@ EOF
|
|||||||
if ( system( "diff -q $configfile $configfile.bak > /dev/null" ) ) {
|
if ( system( "diff -q $configfile $configfile.bak > /dev/null" ) ) {
|
||||||
progress_message3 "Configuration file $configfile updated - old file renamed $configfile.bak";
|
progress_message3 "Configuration file $configfile updated - old file renamed $configfile.bak";
|
||||||
} else {
|
} else {
|
||||||
if ( unlink "$configfile.bak" ) {
|
if ( rename "$configfile.bak", $configfile ) {
|
||||||
progress_message3 "No update required to configuration file $configfile; $configfile.bak not saved";
|
progress_message3 "No update required to configuration file $configfile; $configfile.bak not saved";
|
||||||
} else {
|
} 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";
|
progress_message3 "No update required to configuration file $configfile";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user