From 0ebc8ca1f9a1b0725b89784d64fe5c34099f86b0 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 20 Jan 2009 14:43:37 -0500 Subject: Use $g['product_name'] instead of pfSense --- etc/inc/config.inc | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'etc/inc/config.inc') diff --git a/etc/inc/config.inc b/etc/inc/config.inc index b8356b6..834ff9c 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -85,7 +85,7 @@ if(file_exists("/cf/conf/config.xml")) { if(stristr($config_contents, "") == true) { if($g['booting']) echo "."; /* user has just upgraded to m0n0wall, replace root xml tags */ - log_error("Upgrading m0n0wall configuration to pfSense... "); + log_error("Upgrading m0n0wall configuration to {$g['product_name']}... "); $config_contents = str_replace("m0n0wall","pfsense", $config_contents); if (!config_validate("{$g['conf_path']}/config.xml")) log_error("ERROR! Could not convert m0n0wall -> pfsense in config.xml"); @@ -166,7 +166,7 @@ if ($g['booting'] and !file_exists($g['cf_conf_path'] . "/config.xml") ) { $last_backup = discover_last_backup(); if($last_backup) { log_error("No config.xml found, attempting last known config restore."); - file_notice("config.xml", "No config.xml found, attempting last known config restore.", "pfSenseConfigurator", ""); + file_notice("config.xml", "No config.xml found, attempting last known config restore.", "{$g['product_name']}Configurator", ""); restore_backup("/cf/conf/backup/{$last_backup}"); } else { /* no device found, print an error and die */ @@ -175,7 +175,7 @@ if ($g['booting'] and !file_exists($g['cf_conf_path'] . "/config.xml") ) { ******************************************************************************* * FATAL ERROR * * The device that contains the configuration file (config.xml) could not be * -* found. pfSense cannot continue booting. * +* found. {$g['product_name']} cannot continue booting. * ******************************************************************************* @@ -219,7 +219,7 @@ function parse_config($parse = false) { $last_backup = discover_last_backup(); if($last_backup) { log_error("No config.xml found, attempting last known config restore."); - file_notice("config.xml", "No config.xml found, attempting last known config restore.", "pfSenseConfigurator", ""); + file_notice("config.xml", "No config.xml found, attempting last known config restore.", "{$g['product_name']}Configurator", ""); restore_backup("{$g['conf_path']}/backup/{$last_backup}"); } else { die("Config.xml is corrupted and is 0 bytes. Could not restore a previous backup."); @@ -238,7 +238,7 @@ function parse_config($parse = false) { config_unlock(); if(!file_exists($g['conf_path'] . "/config.xml")) { log_error("No config.xml found, attempting last known config restore."); - file_notice("config.xml", "No config.xml found, attempting last known config restore.", "pfSenseConfigurator", ""); + file_notice("config.xml", "No config.xml found, attempting last known config restore.", "{$g['product_name']}Configurator", ""); $last_backup = discover_last_backup(); if ($last_backup) restore_backup("/cf/conf/backup/{$last_backup}"); @@ -251,7 +251,7 @@ function parse_config($parse = false) { if(!file_exists($g['conf_path'] . "/config.xml")) { if($g['booting']) echo "."; log_error("No config.xml found, attempting last known config restore."); - file_notice("config.xml", "No config.xml found, attempting last known config restore.", "pfSenseConfigurator", ""); + file_notice("config.xml", "No config.xml found, attempting last known config restore.", "{$g['product_name']}Configurator", ""); $last_backup = discover_last_backup(); if ($last_backup) restore_backup("/cf/conf/backup/{$last_backup}"); @@ -331,8 +331,8 @@ function restore_backup($file) { conf_mount_rw(); copy("$file","/cf/conf/config.xml"); unlink_if_exists("/tmp/config.cache"); - log_error("pfSense is restoring the configuration $file"); - file_notice("config.xml", "pfSense is restoring the configuration $file", "pfSenseConfigurator", ""); + log_error("{$g['product_name']} is restoring the configuration $file"); + file_notice("config.xml", "{$g['product_name']} is restoring the configuration $file", "{$g['product_name']}Configurator", ""); mwexec("sync"); conf_mount_ro(); } @@ -368,11 +368,11 @@ function parse_config_bootup() { $last_backup = discover_last_backup(); if($last_backup) { log_error("No config.xml found, attempting last known config restore."); - file_notice("config.xml", "No config.xml found, attempting last known config restore.", "pfSenseConfigurator", ""); + file_notice("config.xml", "No config.xml found, attempting last known config restore.", "{$g['product_name']}Configurator", ""); restore_backup("/cf/conf/backup/{$last_backup}"); } if(!file_exists("{$g['conf_path']}/config.xml")) { - echo "XML configuration file not found. pfSense cannot continue booting.\n"; + echo "XML configuration file not found. {$g['product_name']} cannot continue booting.\n"; mwexec("/sbin/halt"); exit; } @@ -403,9 +403,9 @@ function parse_config_bootup() { ******************************************************************************* * WARNING! * -* The current configuration has been created with a newer version of pfSense * +* The current configuration has been created with a newer version of {$g['product_name']} * * than this one! This can lead to serious misbehavior and even security * -* holes! You are urged to either upgrade to a newer version of pfSense or * +* holes! You are urged to either upgrade to a newer version of {$g['product_name']} or * * revert to the default configuration immediately! * ******************************************************************************* @@ -1277,7 +1277,7 @@ function set_networking_interfaces_ports() { if($avail < 115) { echo "\n\n\n"; echo "DANGER! WARNING!\n\n"; - echo "pfSense requires *AT LEAST* 128 megs of ram to function correctly.\n"; + echo "{$g['product_name']} requires *AT LEAST* 128 megs of ram to function correctly.\n"; echo "Only ($avail) megs of ram has been detected.\n"; echo "\nPress ENTER to continue."; fgets($fp); @@ -1330,11 +1330,11 @@ EOD; echo <<