Project

General

Profile

Bug #15157 » 1147.diff

Steve Wheeler, 04/03/2024 05:57 PM

View differences:

src/etc/inc/config.lib.inc
92 92
		$last_backup = discover_last_backup();
93 93
		if ($last_backup) {
94 94
			log_error(gettext("No config.xml found, attempting last known config restore."));
95
			file_notice("config.xml", gettext("No config.xml found, attempting last known config restore."), "pfSenseConfigurator", "");
95
			file_notice("config.xml", gettext("No config.xml found, attempting last known config restore."), "pfSenseConfigurator", "", 1, true);
96 96
			restore_backup("{$g['conf_path']}/backup/{$last_backup}");
97 97
		} else {
98 98
			unlock($lockkey);
......
123 123
				echo ".";
124 124
			}
125 125
			log_error("No config.xml found, attempting last known config restore.");
126
			file_notice("config.xml", "No config.xml found, attempting last known config restore.", "pfSenseConfigurator", "");
126
			file_notice("config.xml", "No config.xml found, attempting last known config restore.", "pfSenseConfigurator", "", 1, true);
127 127
			$last_backup = discover_last_backup();
128 128
			if ($last_backup) {
129 129
				restore_backup("/cf/conf/backup/{$last_backup}");
......
236 236
		//pfSense_fsync($g['conf_path']);
237 237
		disable_security_checks();
238 238
		log_error(sprintf(gettext('%1$s is restoring the configuration %2$s'), g_get('product_label'), $file));
239
		file_notice("config.xml", sprintf(gettext('%1$s is restoring the configuration %2$s'), g_get('product_label'), $file), "pfSenseConfigurator", "");
239
		file_notice("config.xml", sprintf(gettext('%1$s is restoring the configuration %2$s'), g_get('product_label'), $file), "pfSenseConfigurator", "", 1, true);
240 240
	}
241 241
}
242 242

  
......
389 389
			$last_backup = discover_last_backup();
390 390
			if ($last_backup) {
391 391
				log_error("No config.xml found, attempting last known config restore.");
392
				file_notice("config.xml", gettext("No config.xml found, attempting last known config restore."), "pfSenseConfigurator", "");
392
				file_notice("config.xml", gettext("No config.xml found, attempting last known config restore."), "pfSenseConfigurator", "", 1, true);
393 393
				restore_backup("/cf/conf/backup/{$last_backup}");
394 394
			}
395 395
			if (!file_exists("{$g['conf_path']}/config.xml")) {
......
411 411
		$last_backup = discover_last_backup();
412 412
		if ($last_backup) {
413 413
			log_error(gettext("No config.xml found, attempting last known config restore."));
414
			file_notice("config.xml", gettext("No config.xml found, attempting last known config restore."), "pfSenseConfigurator", "");
414
			file_notice("config.xml", gettext("No config.xml found, attempting last known config restore."), "pfSenseConfigurator", "", 1, true);
415 415
			restore_backup("{$g['conf_path']}/backup/{$last_backup}");
416 416
		} else {
417 417
			unlock($lockkey);
(2-2/2)