mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Use $g['product_name'] instead of pfSense
This commit is contained in:
parent
c317e04ef4
commit
0ebc8ca1f9
@ -90,12 +90,12 @@ function captiveportal_configure() {
|
||||
$htmltext = <<<EOD
|
||||
<html>
|
||||
<head>
|
||||
<title>pfSense captive portal</title>
|
||||
<title>{$g['product_name']} captive portal</title>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<h2>pfSense captive portal</h2>
|
||||
Welcome to the pfSense Captive Portal! This is the default page since a custom page has not been defined.
|
||||
<h2>{$g['product_name']} captive portal</h2>
|
||||
Welcome to the {$g['product_name']} Captive Portal! This is the default page since a custom page has not been defined.
|
||||
<p>
|
||||
<form method="post" action="\$PORTAL_ACTION\$">
|
||||
<input name="redirurl" type="hidden" value="\$PORTAL_REDIRURL\$">
|
||||
@ -1080,7 +1080,7 @@ function getNasID()
|
||||
$nasId = "";
|
||||
exec("/bin/hostname", $nasId);
|
||||
if(!$nasId[0])
|
||||
$nasId[0] = "pfSense";
|
||||
$nasId[0] = $g['product_name'];
|
||||
return $nasId[0];
|
||||
}
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ if(file_exists("/cf/conf/config.xml")) {
|
||||
if(stristr($config_contents, "<m0n0wall>") == 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 <<<EOD
|
||||
|
||||
*NOTE* pfSense requires *AT LEAST* 2 assigned interfaces to function.
|
||||
*NOTE* {$g['product_name']} requires *AT LEAST* 2 assigned interfaces to function.
|
||||
If you do not have two interfaces you CANNOT continue.
|
||||
|
||||
If you do not have at least two *REAL* network interface cards
|
||||
or one interface with multiple VLANs then pfSense *WILL NOT*
|
||||
or one interface with multiple VLANs then {$g['product_name']} *WILL NOT*
|
||||
function correctly.
|
||||
|
||||
If you do not know the names of your interfaces, you may choose to use
|
||||
|
||||
Loading…
Reference in New Issue
Block a user