From 84683e42c96455d90b4cec5545bdedb5071ac5f1 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Mon, 28 Jan 2013 11:30:10 -0200 Subject: 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. --- etc/inc/upgrade_config.inc | 6 ++---- 1 file 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"; -- cgit v1.1