fix: Fixed the old port rrd migration code to work with new rrdtool functions (#4616)

This commit is contained in:
Neil Lathwood
2016-09-27 15:18:57 +01:00
committed by Tony Murray
parent 88dc19a323
commit 5c4d383f80

View File

@@ -226,7 +226,7 @@ $ports = $ports_mapped['ports'];
// Rename any old RRD files still named after the previous ifIndex based naming schema.
foreach ($ports_mapped['maps']['ifIndex'] as $ifIndex => $port_id) {
foreach (array ('', '-adsl', '-dot3') as $suffix) {
$old_rrd_name = "port-$ifIndex$suffix.rrd";
$old_rrd_name = "port-$ifIndex$suffix";
$new_rrd_name = getPortRrdName($port_id, ltrim($suffix, '-'));
rrd_file_rename($device, $old_rrd_name, $new_rrd_name);