Project

General

Profile

« Previous | Next » 

Revision 3048dd47

Added by Alistair Francis over 7 years ago

upgrade_config.inc: Remove all restore_rrd() calls

Commit 0869605131ba3e5d7e502af7a799e54f27d2e7f6 removed the
restore_rrd() function. To avoid errors when restoring older configs
remove all callers to it.

Bug: https://redmine.pfsense.org/issues/8231
Signed-off-by: Alistair Francis <>

View differences:

src/etc/inc/upgrade_config.inc
2064 2064

  
2065 2065
	$rrddbpath = "/var/db/rrd/";
2066 2066
	$rrdtool = "/usr/bin/nice -n20 /usr/local/bin/rrdtool";
2067
	if (isset($config['system']['use_mfs_tmpvar'])) {
2068
		/* restore the databases, if we have one */
2069
		if (restore_rrd()) {
2070
			/* Make sure to move the rrd backup out of the way. We will make a new one after converting. */
2071
			@rename("{$g['cf_conf_path']}/rrd.tgz", "{$g['cf_conf_path']}/backup/rrd.tgz");
2072
		}
2073
	}
2074 2067

  
2075 2068
	$rrdinterval = 60;
2076 2069
	$valid = $rrdinterval * 2;
......
2783 2776
	$rrddbpath = "/var/db/rrd/";
2784 2777
	$rrdtool = "/usr/bin/nice -n20 /usr/local/bin/rrdtool";
2785 2778

  
2786
	if (isset($config['system']['use_mfs_tmpvar'])) {
2787
		/* restore the databases, if we have one */
2788
		if (restore_rrd()) {
2789
			/* Make sure to move the rrd backup out of the way. We will make a new one after converting. */
2790
			@rename("{$g['cf_conf_path']}/rrd.tgz", "{$g['cf_conf_path']}/backup/rrd.tgz");
2791
		}
2792
	}
2793

  
2794 2779
	$rrdinterval = 60;
2795 2780
	$valid = $rrdinterval * 2;
2796 2781

  
......
3255 3240
	$rrddbpath = "/var/db/rrd";
3256 3241
	$rrdtool = "/usr/local/bin/rrdtool";
3257 3242

  
3258
	if (isset($config['system']['use_mfs_tmpvar'])) {
3259
		/* restore the databases, if we have one */
3260
		if (restore_rrd()) {
3261
			/* Make sure to move the rrd backup out of the way. We will make a new one after converting. */
3262
			@rename("{$g['cf_conf_path']}/rrd.tgz", "{$g['cf_conf_path']}/backup/rrd.tgz");
3263
		}
3264
	}
3265

  
3266 3243
	/* Assume 2*10GigE for now */
3267 3244
	$stream = 2500000000;
3268 3245

  
......
4648 4625
	$awkcmd .= "    print;\n";
4649 4626
	$awkcmd .= "}'";
4650 4627

  
4651
	if (isset($config['system']['use_mfs_tmpvar'])) {
4652
		/* restore the databases, if we have one */
4653
		if (restore_rrd()) {
4654
			/* Make sure to move the rrd backup out of the way. We will make a new one after converting. */
4655
			@rename("{$g['cf_conf_path']}/rrd.tgz", "{$g['cf_conf_path']}/backup/rrd.tgz");
4656
		}
4657
	}
4658

  
4659 4628
	$databases = return_dir_as_array($rrddbpath, '/-quality\.rrd$/');
4660 4629
	foreach ($databases as $database) {
4661 4630
		$xmldump = "{$g['tmp_path']}/{$database}.xml";

Also available in: Unified diff