mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Use right function pfSense_fsync to make sure config file is safe on disk, ticket #4803
This commit is contained in:
parent
8cbb22c653
commit
d0577bd23e
@ -379,7 +379,7 @@ function conf_mount_ro() {
|
||||
|
||||
clear_subsystem_dirty('mount');
|
||||
/* sync data, then force a remount of /cf */
|
||||
pfSense_sync();
|
||||
pfSense_fsync($g['cf_path']);
|
||||
mwexec("/sbin/mount -u -r -f -o sync,noatime {$g['cf_path']}");
|
||||
mwexec("/sbin/mount -u -r -f -o sync,noatime /");
|
||||
}
|
||||
@ -493,9 +493,7 @@ function safe_write_file($file, $content, $force_binary) {
|
||||
}
|
||||
|
||||
// Sync file before returning
|
||||
pfSense_sync();
|
||||
|
||||
return true;
|
||||
return pfSense_fsync(dirname($file));
|
||||
}
|
||||
|
||||
/****f* config/write_config
|
||||
|
||||
Loading…
Reference in New Issue
Block a user