summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/config.lib.inc
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-10-12 15:27:09 -0300
committerRenato Botelho <renato@netgate.com>2016-10-12 15:27:09 -0300
commit60f164f33ea3248c22b2924e4f929539a04febbe (patch)
tree210efc483f3c920b902b61b4f1e0a326fa68761a /src/etc/inc/config.lib.inc
parentf68a881cc60df0209a6169cf2b74d593968950eb (diff)
downloadpfsense-60f164f33ea3248c22b2924e4f929539a04febbe.zip
pfsense-60f164f33ea3248c22b2924e4f929539a04febbe.tar.gz
Retire cdrom platform support
Diffstat (limited to 'src/etc/inc/config.lib.inc')
-rw-r--r--src/etc/inc/config.lib.inc42
1 files changed, 13 insertions, 29 deletions
diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc
index c7bf59c..d2e5a19 100644
--- a/src/etc/inc/config.lib.inc
+++ b/src/etc/inc/config.lib.inc
@@ -228,32 +228,20 @@ function parse_config_bootup() {
$lockkey = lock('config');
if (!file_exists("{$g['conf_path']}/config.xml")) {
if (platform_booting()) {
- if (strstr($g['platform'], "cdrom")) {
- /* try copying the default config. to the floppy */
- echo gettext("Resetting factory defaults...") . "\n";
- reset_factory_defaults(true, false);
- if (!file_exists("{$g['conf_path']}/config.xml")) {
- echo gettext("No XML configuration file found - using factory defaults.\n" .
- "Make sure that the configuration floppy disk with the conf/config.xml\n" .
- "file is inserted. If it isn't, the configuration changes will be lost\n" .
- "on reboot.\n");
- }
- } else {
- $last_backup = discover_last_backup();
- if ($last_backup) {
- log_error("No config.xml found, attempting last known config restore.");
- file_notice("config.xml", gettext("No config.xml found, attempting last known config restore."), "pfSenseConfigurator", "");
- restore_backup("/cf/conf/backup/{$last_backup}");
- }
- if (!file_exists("{$g['conf_path']}/config.xml")) {
- echo sprintf(gettext("XML configuration file not found. %s cannot continue booting."), $g['product_name']) . "\n";
- unlock($lockkey);
- mwexec("/sbin/halt");
- exit;
- }
- log_error("Last known config found and restored. Please double check the configuration file for accuracy.");
- file_notice("config.xml", gettext("Last known config found and restored. Please double check the configuration file for accuracy."), "pfSenseConfigurator", "");
+ $last_backup = discover_last_backup();
+ if ($last_backup) {
+ log_error("No config.xml found, attempting last known config restore.");
+ file_notice("config.xml", gettext("No config.xml found, attempting last known config restore."), "pfSenseConfigurator", "");
+ restore_backup("/cf/conf/backup/{$last_backup}");
+ }
+ if (!file_exists("{$g['conf_path']}/config.xml")) {
+ echo sprintf(gettext("XML configuration file not found. %s cannot continue booting."), $g['product_name']) . "\n";
+ unlock($lockkey);
+ mwexec("/sbin/halt");
+ exit;
}
+ log_error("Last known config found and restored. Please double check the configuration file for accuracy.");
+ file_notice("config.xml", gettext("Last known config found and restored. Please double check the configuration file for accuracy."), "pfSenseConfigurator", "");
} else {
unlock($lockkey);
log_error(gettext("Could not find a usable configuration file! Exiting...."));
@@ -811,10 +799,6 @@ function get_backups() {
function backup_config() {
global $config, $g;
- if ($g['platform'] == "cdrom") {
- return;
- }
-
conf_mount_rw();
/* Create backup directory if needed */
OpenPOWER on IntegriCloud