diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-01-28 11:30:10 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-01-28 11:30:10 -0200 |
commit | 84683e42c96455d90b4cec5545bdedb5071ac5f1 (patch) | |
tree | 6d884d102210d853b11d599720d013a37b5635f0 | |
parent | a2219caf9ca5a87809a35707805660d68adfd484 (diff) | |
download | pfsense-84683e42c96455d90b4cec5545bdedb5071ac5f1.zip pfsense-84683e42c96455d90b4cec5545bdedb5071ac5f1.tar.gz |
Fix rrd databases upgrade. Helps ticket #2651
- Replace find that was being called with wrong parameters at
upgrade_054_to_055() and upgrade_080_to_081() by return_dir_as_array()
call.
-rw-r--r-- | etc/inc/upgrade_config.inc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index de02e3c..608ce09 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -2049,8 +2049,7 @@ function upgrade_054_to_055() { setup_gateways_monitor(); /* build a list of traffic and packets databases */ - $databases = array(); - exec("cd $rrddbpath;/usr/bin/find *-traffic.rrd *-packets.rrd", $databases); + $databases = return_dir_as_array($rrddbpath, '/-(traffic|packets)\.rrd$/'); rsort($databases); foreach($databases as $database) { $databasetmp = "{$database}.tmp"; @@ -2662,8 +2661,7 @@ function upgrade_080_to_081() { $upstream = 125000000; /* build a list of traffic and packets databases */ - $databases = array(); - exec("cd $rrddbpath;/usr/bin/find *-traffic.rrd *-packets.rrd", $databases); + $databases = return_dir_as_array($rrddbpath, '/-(traffic|packets)\.rrd$/'); rsort($databases); foreach($databases as $database) { $databasetmp = "{$database}.tmp"; |