Revision 429e0911
Added by NOYB NOYB over 9 years ago
src/etc/inc/config.lib.inc | ||
---|---|---|
515 | 515 |
* null |
516 | 516 |
******/ |
517 | 517 |
/* save the system configuration */ |
518 |
function write_config($desc="Unknown", $backup = true) { |
|
518 |
function write_config($desc="Unknown", $backup = true, $write_config_only = false) {
|
|
519 | 519 |
global $config, $g; |
520 | 520 |
|
521 | 521 |
if (!empty($_SERVER['REMOTE_ADDR'])) { |
... | ... | |
580 | 580 |
|
581 | 581 |
unlock($lockkey); |
582 | 582 |
|
583 |
if ($write_config_only) { |
|
584 |
/* tell kernel to sync fs data */ |
|
585 |
conf_mount_ro(); |
|
586 |
return $config; |
|
587 |
} |
|
588 |
|
|
583 | 589 |
unlink_if_exists("/usr/local/pkg/pf/carp_sync_client.php"); |
584 | 590 |
|
585 | 591 |
/* tell kernel to sync fs data */ |
Also available in: Unified diff
Write Config Only Option
Add write_config function option to only write the config. Sometimes syncing firewall is not necessary or desirable. ex: changing log display options.