diff options
author | doktornotor <notordoktor@gmail.com> | 2015-08-24 13:42:39 +0200 |
---|---|---|
committer | doktornotor <notordoktor@gmail.com> | 2015-08-24 13:42:39 +0200 |
commit | c832ce3548177fcca2cc9967a5e343ce0de04145 (patch) | |
tree | 9988674b510b632e090b0c3fff9e9846253323bc /config/autoconfigbackup | |
parent | 029c748b6d904b1cd61811d50f08eed66c99d879 (diff) | |
download | pfsense-packages-c832ce3548177fcca2cc9967a5e343ce0de04145.tar.gz pfsense-packages-c832ce3548177fcca2cc9967a5e343ce0de04145.tar.bz2 pfsense-packages-c832ce3548177fcca2cc9967a5e343ce0de04145.zip |
autoconfigbackup.inc Only remount if the file exists
Diffstat (limited to 'config/autoconfigbackup')
-rw-r--r-- | config/autoconfigbackup/autoconfigbackup.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/config/autoconfigbackup/autoconfigbackup.inc b/config/autoconfigbackup/autoconfigbackup.inc index ef22a30f..64a16101 100644 --- a/config/autoconfigbackup/autoconfigbackup.inc +++ b/config/autoconfigbackup/autoconfigbackup.inc @@ -74,9 +74,11 @@ function acb_custom_php_validation_command($post, &$input_errors) { } function acb_custom_php_resync_config_command() { - conf_mount_rw(); - unlink_if_exists("/cf/conf/lastpfSbackup.txt"); - conf_mount_ro(); + if (is_file("/cf/conf/lastpfSbackup.txt") { + conf_mount_rw(); + unlink("/cf/conf/lastpfSbackup.txt"); + conf_mount_ro(); + } if (!function_exists("filter_configure")) { require_once("filter.inc"); } |