Project

General

Profile

« Previous | Next » 

Revision 041a6f28

Added by Bill Marquette over 20 years ago

No need for config lock or to mount conf media r/w - write_config() does that for us
Fix the 10 second stale lock wait :)

View differences:

etc/inc/pfsense-utils.inc
769 769
 */
770 770
function restore_config_section($section, $new_contents) {
771 771
    global $config;
772
    conf_mount_rw();
773
    config_lock();
774 772
    $fout = fopen("{$g['tmp_path']}/tmpxml","w");
775 773
    fwrite($fout, $new_contents);
776 774
    fclose($fout);
......
778 776
    $config[$section] = &$section_xml;
779 777
    unlink($g['tmp_path'] . "/tmpxml");
780 778
    write_config("Restored {$section} of config file (maybe from CARP partner)");
781
    conf_mount_ro();
782
    config_unlock();
783 779
    return;
784 780
}
785 781

  

Also available in: Unified diff