aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-05-28 14:54:20 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-05-28 14:54:20 -0300
commitf6332796d346869dc1607d698833b23babc9b9db (patch)
tree925d2ea28ebe9b12832544cbff7d650561437a9d /config
parent0dba589de0f7f08ce1bec83d211204cbad670509 (diff)
downloadpfsense-packages-f6332796d346869dc1607d698833b23babc9b9db.tar.gz
pfsense-packages-f6332796d346869dc1607d698833b23babc9b9db.tar.bz2
pfsense-packages-f6332796d346869dc1607d698833b23babc9b9db.zip
Trucate file using a better way than ugly exec() Calls
Diffstat (limited to 'config')
-rw-r--r--config/autoconfigbackup/autoconfigbackup.xml2
-rw-r--r--config/autoconfigbackup/autoconfigbackup_backup.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/config/autoconfigbackup/autoconfigbackup.xml b/config/autoconfigbackup/autoconfigbackup.xml
index f3505f6a..47391f4b 100644
--- a/config/autoconfigbackup/autoconfigbackup.xml
+++ b/config/autoconfigbackup/autoconfigbackup.xml
@@ -145,7 +145,7 @@
<custom_php_resync_config_command>
<![CDATA[
conf_mount_rw();
- exec("echo > /cf/conf/lastpfSbackup.txt");
+ file_put_contents("/cf/conf/lastpfSbackup.txt", "");
conf_mount_ro();
if(!function_exists("filter_configure"))
require_once("filter.inc");
diff --git a/config/autoconfigbackup/autoconfigbackup_backup.php b/config/autoconfigbackup/autoconfigbackup_backup.php
index a65fba4d..9ef752fa 100644
--- a/config/autoconfigbackup/autoconfigbackup_backup.php
+++ b/config/autoconfigbackup/autoconfigbackup_backup.php
@@ -48,7 +48,7 @@ if($_POST) {
else
write_config("Backup invoked via Auto Config Backup.");
$config = parse_config(true);
- exec("echo > /cf/conf/lastpfSbackup.txt");
+ file_put_contents("/cf/conf/lastpfSbackup.txt", "");
upload_config($_REQUEST['reason']);
$savemsg = "Backup completed successfully.";
$donotshowheader=true;