aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/autoconfigbackup/crypt_acb.php5
-rw-r--r--packages/autoconfigbackup/upload_config_filter.php6
2 files changed, 10 insertions, 1 deletions
diff --git a/packages/autoconfigbackup/crypt_acb.php b/packages/autoconfigbackup/crypt_acb.php
index 8c56dcaf..ba12af80 100644
--- a/packages/autoconfigbackup/crypt_acb.php
+++ b/packages/autoconfigbackup/crypt_acb.php
@@ -43,7 +43,10 @@
fwrite($pipes[0], $data);
fclose($pipes[0]);
- $rslt = stream_get_contents($pipes[1]);
+ while (!feof($pipes[1])) {
+ $rslt .= fread($pipes[1], 8192);
+ }
+
fclose($pipes[1]);
proc_close($fp);
diff --git a/packages/autoconfigbackup/upload_config_filter.php b/packages/autoconfigbackup/upload_config_filter.php
index 935f8d7b..d26f697d 100644
--- a/packages/autoconfigbackup/upload_config_filter.php
+++ b/packages/autoconfigbackup/upload_config_filter.php
@@ -15,6 +15,12 @@ if(strstr($pfSversion, "1.2"))
*/
// Define some needed variables
+if(!file_exists("/cf/conf/lastpfSbackup.txt")) {
+ conf_mount_rw();
+ touch("/cf/conf/lastpfSbackup.txt");
+ conf_mount_ro();
+}
+
$last_backup_date = str_replace("\n", "", file_get_contents("/cf/conf/lastpfSbackup.txt"));
$last_config_change = $config['revision']['time'];
$hostname = $config['system']['hostname'];