From 36d0358b568a0dde740ade770408bef2d8c3fa65 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 16 Dec 2007 20:43:26 +0000 Subject: Add product_copyright re-branding support Add product_copyright_years re-branding support Add product_website re-branding support Add product_email re-branding support Work sponsored-by: Centipede Networks --- etc/inc/captiveportal.inc | 8 ++++---- etc/inc/config.inc | 18 +++++++++--------- etc/inc/globals.inc | 5 +++++ etc/inc/interfaces.inc | 2 +- etc/inc/pfsense-utils.inc | 8 ++++---- etc/inc/service-utils.inc | 2 +- usr/local/www/diag_backup.php | 2 +- usr/local/www/diag_defaults.php | 2 +- usr/local/www/diag_logs_settings.php | 2 +- usr/local/www/edit.php | 2 +- usr/local/www/fend.inc | 2 +- usr/local/www/firewall_rules_edit.php | 2 +- usr/local/www/firewall_rules_schedule_logic.php | 2 +- usr/local/www/index.php | 8 ++++---- usr/local/www/interfaces_vlan.php | 2 +- usr/local/www/license.php | 6 +++--- usr/local/www/pkg_mgr.php | 4 ++-- usr/local/www/services_captiveportal.php | 6 +++--- usr/local/www/services_dhcp_relay.php | 2 +- usr/local/www/services_proxyarp.php | 2 +- usr/local/www/status.php | 2 +- usr/local/www/status_upnp.php | 5 ----- usr/local/www/system.php | 4 ++-- usr/local/www/system_advanced.php | 4 ++-- usr/local/www/system_firmware.php | 2 +- usr/local/www/system_firmware_settings.php | 2 +- usr/local/www/system_groupmanager.php | 6 +++--- usr/local/www/system_usermanager.php | 1 - usr/local/www/system_usermanager_edit.php | 2 -- usr/local/www/xmlrpc.php | 2 +- 30 files changed, 57 insertions(+), 60 deletions(-) diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 14271dc..93f90d9 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -90,12 +90,12 @@ function captiveportal_configure() { $htmltext = << -pfSense captive portal +{$g['product_name']} captive portal
-

pfSense captive portal

-Welcome to the pfSense Captive Portal! This is the default page since a custom page has not been defined. +

{$g['product_name']} captive portal

+Welcome to the {$g['product_name']} Captive Portal! This is the default page since a custom page has not been defined.

@@ -1074,7 +1074,7 @@ function getNasID() $nasId = ""; exec("/bin/hostname", $nasId); if(!$nasId[0]) - $nasId[0] = "pfSense"; + $nasId[0] = "{$g['product_name']}"; return $nasId[0]; } diff --git a/etc/inc/config.inc b/etc/inc/config.inc index ce8265c..864bba4 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -167,7 +167,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. * ******************************************************************************* @@ -316,8 +316,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", "pfSenseConfigurator", ""); conf_mount_ro(); } config_unlock(); @@ -356,7 +356,7 @@ function parse_config_bootup() { 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; } @@ -389,9 +389,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! * ******************************************************************************* @@ -1387,7 +1387,7 @@ function set_networking_interfaces_ports() { if($avail < 115) { echo "\n\n\n"; echo "DANGER! WARNING!\n\n"; - echo "pfSense requires *ATLEAST* 128 megs of ram to function correctly.\n"; + echo "{$g['product_name']} requires *ATLEAST* 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); @@ -1440,13 +1440,13 @@ EOD; echo << "/usr/local/www", "xml_rootobj" => "pfsense", "admin_group" => "admins", + "product_name" => "pfSense", + "product_copyright" => "Scott Ullrich", + "product_copyright_years" => "2005, 2006, 2007, 2008", + "product_website" => "http://www.pfsense.com", + "product_email" => "coreteam@pfsense.com", "pppoe_interface" => "ng0", "n_pptp_units" => 16, /* this value can be overriden in pptp->n_pptp_units */ "pptp_subnet" => 28, /* this value can be overriden in pptp->pptp_subnet */ diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 4a14950..4621e2f 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -536,7 +536,7 @@ function interfaces_wireless_configure($if, $wlcfg) { $fd_set = fopen("/tmp/{$if}_setup.sh","w"); fwrite($fd_set, "#!/bin/sh\n"); - fwrite($fd_set, "# pfSense wireless configuration script.\n\n"); + fwrite($fd_set, "# {$g['product_name']} wireless configuration script.\n\n"); fwrite($fd_set, "# enable shell debugging\n"); fwrite($fd_set, "set -x\n"); diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 7e0e29b..8a51674 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -2132,8 +2132,8 @@ function make_dirs($path, $mode = 0755) { * call_pfsense_method(): Call a method exposed by the pfsense.com XMLRPC server. */ function call_pfsense_method($method, $params, $timeout = 0) { - $ip = gethostbyname('www.pfsense.com'); - if($ip == "www.pfsense.com") + $ip = gethostbyname($g['product_website']); + if($ip == $g['product_website']) return false; global $g, $config; $xmlrpc_base_url = $g['xmlrpcbaseurl']; @@ -2157,8 +2157,8 @@ function call_pfsense_method($method, $params, $timeout = 0) { */ function check_firmware_version($tocheck = "all", $return_php = true) { global $g, $config; - $ip = gethostbyname('www.pfsense.com'); - if($ip == "www.pfsense.com") + $ip = gethostbyname($g['product_website']); + if($ip == $g['product_website']) return false; $rawparams = array("firmware" => array("version" => trim(file_get_contents('/etc/version'))), "kernel" => array("version" => trim(file_get_contents('/etc/version_kernel'))), diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index 3877e0b..af94452 100644 --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -36,7 +36,7 @@ function write_rcfile($params) { $fileprefix = "/usr/local/etc/rc.d/"; if(!(is_writable($fileprefix . $params['file']) or $params['start'])) return false; - $towrite .= "#!/bin/sh\n# This file was automatically generated\n# by the pfSense service handler.\n\n"; + $towrite .= "#!/bin/sh\n# This file was automatically generated\n# by the {$g['product_website']} service handler.\n\n"; /* write our rc functions */ $towrite .= "rc_start() {\n\t" . $params['start'] . "\n}\n\n"; if($params['stop']) { diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php index dc024b7..6f4a99c 100755 --- a/usr/local/www/diag_backup.php +++ b/usr/local/www/diag_backup.php @@ -268,7 +268,7 @@ include("head.inc");   - Open a pfSense configuration XML file and click the button below to restore the configuration.

Restore area: + Open a {$g['[product_name']} configuration XML file and click the button below to restore the configuration.

Restore area:

Note:
The firewall may need a reboot after restoring the configuration.

diff --git a/usr/local/www/diag_defaults.php b/usr/local/www/diag_defaults.php index ac7be2d..b552b18 100755 --- a/usr/local/www/diag_defaults.php +++ b/usr/local/www/diag_defaults.php @@ -61,7 +61,7 @@ include("head.inc");
  • System will be configured as a DHCP server on the default LAN interface
  • Reboot after changes are installed
  • WAN interface will be set to obtain an address automatically from a DHCP server
  • -
  • Default webConfigurator password will be reset to 'pfsense'
  • +
  • Default webConfigurator password will be reset to '{$g['product_name']}'
  • Default webConfigurator username will be reset to 'admin'
  • Are you sure you want to proceed?

    diff --git a/usr/local/www/diag_logs_settings.php b/usr/local/www/diag_logs_settings.php index 2bff181..c2a72db 100755 --- a/usr/local/www/diag_logs_settings.php +++ b/usr/local/www/diag_logs_settings.php @@ -204,7 +204,7 @@ function enable_change(enable_over) { Note:
    syslog sends UDP datagrams to port 514 on the specified remote syslog server. Be sure to set syslogd on the - remote server to accept syslog messages from pfSense. + remote server to accept syslog messages from {$g['product_name']}. diff --git a/usr/local/www/edit.php b/usr/local/www/edit.php index e960831..9aa913b 100755 --- a/usr/local/www/edit.php +++ b/usr/local/www/edit.php @@ -107,7 +107,7 @@ else Exec+ v1.02-000 - Copyright 2001-2003, All rights reserved Created by technologEase (http://www.technologEase.com). (modified for m0n0wall by Manuel Kasper ) - (modified for pfSense Edit/Save file by Scott Ullrich, Copyright 2004, 2005) + (modified for {$g['product_name']} Edit/Save file by Scott Ullrich, Copyright 2004, 2005) */ // Function: is Blank diff --git a/usr/local/www/fend.inc b/usr/local/www/fend.inc index 54aaec3..8afb52c 100755 --- a/usr/local/www/fend.inc +++ b/usr/local/www/fend.inc @@ -3,7 +3,7 @@ diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index c3e3743..643c0da 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -776,7 +776,7 @@ include("head.inc");

    - +
    • keep state
    Works with all IP protocols.
    • modulate state
    Works only with TCP. pfSense will generate strong Initial Sequence Numbers (ISNs) for packets matching this rule.
    • modulate state
    Works only with TCP. {$g['product_name']} will generate strong Initial Sequence Numbers (ISNs) for packets matching this rule.
    • synproxy state
    Proxies incoming TCP connections to help protect servers from spoofed TCP SYN floods. This option includes the functionality of keep state and modulate state combined.
    • none
    Do not use state mechanisms to keep track. This is only useful if you're doing advanced queueing in certain situations. Please check the documentation.
    diff --git a/usr/local/www/firewall_rules_schedule_logic.php b/usr/local/www/firewall_rules_schedule_logic.php index 9f714b3..f93436d 100644 --- a/usr/local/www/firewall_rules_schedule_logic.php +++ b/usr/local/www/firewall_rules_schedule_logic.php @@ -1,5 +1,5 @@

    -When working with pfSense based schedules, the logic is a bit different from the normal pfSense rules.
    +When working with {$g['product_name']} based schedules, the logic is a bit different from the normal {$g['product_name']} rules.
     
     For example, the rules are evaluated from top to bottom.   
     
    diff --git a/usr/local/www/index.php b/usr/local/www/index.php
    index 8d3290b..91f88eb 100755
    --- a/usr/local/www/index.php
    +++ b/usr/local/www/index.php
    @@ -77,7 +77,7 @@
     	## accessed since initial install show this stuff.
     	if(file_exists('/conf/trigger_initial_wizard')) {
     
    -		$pgtitle = array("pfSense first time setup");
    +		$pgtitle = array("{$g['product_name']} first time setup");
     		include('head.inc');
     
     		echo "\n";
    @@ -85,10 +85,10 @@
     		echo "
    \n"; echo "

    \n"; echo "

    \n"; - echo "Welcome to pfSense!

    \n"; + echo "Welcome to {$g['product_name']}!

    \n"; echo "One moment while we start the initial setup wizard.

    \n"; echo "Embedded platform users: Please be patient, the wizard takes a little longer to run than the normal gui.

    \n"; - echo "To bypass the wizard, click on the pfSense wizard on the initial page.\n"; + echo "To bypass the wizard, click on the {$g['product_name']} wizard on the initial page.\n"; echo "

    \n"; echo "\n"; echo "