From aa9dded019cb2ea4735ac328760ce5b6eef71eb7 Mon Sep 17 00:00:00 2001 From: Paul Gear Date: Tue, 5 Nov 2013 09:33:32 +1000 Subject: [PATCH] Remove user-facing references to Observium This eliminates nearly all of the user-facing references to Observium, including in the names of temporary files and in the metadata of PDFs. Many of these may not be used any more, but I've adjusted them anyway. These changes should also make it easier to change the branding later if it is needed. There are a few references of which I still don't understand the significance, so I've left them as-is for now. The Unix agent in particular is rather untidy. --- addhost.php | 5 +- check-errors.php | 2 +- config.php.default | 11 ++--- discovery.php | 2 +- html/includes/functions.inc.php | 9 ++++ html/includes/print-menubar.php | 55 ++------------------- html/includes/tcpdf/config/tcpdf_config.php | 12 ++--- html/index.php | 4 +- html/pages/about.inc.php | 39 +++++---------- html/pages/device/logs.inc.php | 2 +- html/pages/routing.inc.php | 2 +- html/pages/search.inc.php | 2 +- html/pdf.php | 2 +- includes/defaults.inc.php | 36 ++++++++------ includes/definitions.inc.php | 31 ++---------- includes/functions.php | 4 +- includes/polling/unix-agent.inc.php | 2 +- includes/snmp.inc.php | 6 +-- includes/versioncheck.inc.php | 10 ++++ irc.php | 10 ++-- poller.php | 2 +- scripts/agent-local/README | 2 +- scripts/agent-local/apache | 2 +- scripts/agent-local/dpkg | 2 +- scripts/agent-local/mysql | 2 +- scripts/agent-local/rpm | 2 +- scripts/mailscanner.php | 4 +- scripts/mysql_stats.php | 2 + scripts/observium_agent_xinetd | 2 + scripts/shoutcast.php | 4 +- scripts/watchmaillog/watchmaillog.pl | 6 +-- snmp.conf.example | 2 +- 32 files changed, 109 insertions(+), 169 deletions(-) diff --git a/addhost.php b/addhost.php index 67b859d2e..56e35765c 100755 --- a/addhost.php +++ b/addhost.php @@ -36,7 +36,7 @@ if (!empty($argv[1])) // These values are the same as in defaults.inc.php $v3 = array( 'authlevel' => "noAuthNoPriv", - 'authname' => "observium", + 'authname' => "root", 'authpass' => "", 'authalgo' => "MD5", 'cryptopass' => "", @@ -192,8 +192,7 @@ if (!empty($argv[1])) } } -print Console_Color::convert(" -Observium v".$config['version']." Add Host Tool +print Console_Color::convert("\n" . $config['project_name_version']." Add Host Tool Usage (SNMPv1/2c): ./addhost.php <%Whostname%n> [community] [v1|v2c] [port] [" . implode("|",$config['snmp']['transports']) . "] Usage (SNMPv3) : Config Defaults : ./addhost.php <%Whostname%n> any v3 [user] [port] [" . implode("|",$config['snmp']['transports']) . "] diff --git a/check-errors.php b/check-errors.php index 0a430bfed..9290425ef 100755 --- a/check-errors.php +++ b/check-errors.php @@ -52,7 +52,7 @@ if (is_array($errored)) $i++; } // Send the alert email - notify($device, "Observium detected errors on $i interface" . ($i != 1 ? 's' : ''), $msg); + notify($device, $config['project_name'] . " detected errors on $i interface" . ($i != 1 ? 's' : ''), $msg); } echo("$errored interfaces with errors over the past 5 minutes.\n"); diff --git a/config.php.default b/config.php.default index 53e4b4569..0813c9761 100755 --- a/config.php.default +++ b/config.php.default @@ -13,17 +13,14 @@ $config['memcached']['enable'] = FALSE; $config['memcached']['host'] = "localhost"; $config['memcached']['port'] = 11211; -### Locations -$config['install_dir'] = "/opt/librenms"; -$config['html_dir'] = $config['install_dir'] . "/html"; -$config['rrd_dir'] = $config['install_dir'] . "/rrd"; -$config['log_file'] = $config['install_dir'] . "/librenms.log"; +### Locations - it is recommended to keep the default +#$config['install_dir'] = "/opt/librenms"; -### Thie should *only* be set if you want to *force* a particular hostname/port +### This should *only* be set if you want to *force* a particular hostname/port ### It will prevent the web interface being usable form any other hostname #$config['base_url'] = "http://librenms.company.com"; -### Enable the below to use rrdcached. be sure rrd_dir is within the rrdcached dir +### Enable this to use rrdcached. Be sure rrd_dir is within the rrdcached dir ### and that your web server has permission to talk to rrdcached. #$config['rrdcached'] = "unix:/var/run/rrdcached.sock"; diff --git a/discovery.php b/discovery.php index 459659145..a0ba79757 100755 --- a/discovery.php +++ b/discovery.php @@ -30,7 +30,7 @@ $options = getopt("h:m:i:n:d::a::q"); if (!isset($options['q'])) { - echo("Observium v".$config['version']." Discovery\n\n"); + echo($config['project_name_version']." Discovery\n\n"); } if (isset($options['h'])) diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php index b91b13c36..87cc59379 100644 --- a/html/includes/functions.inc.php +++ b/html/includes/functions.inc.php @@ -613,5 +613,14 @@ function generate_ap_url($ap, $vars=array()) return generate_url(array('page' => 'device', 'device' => $ap['device_id'], 'tab' => 'accesspoint', 'ap' => $ap['accesspoint_id']), $vars); } +function report_this($message) +{ + return '

'.$message.' Please report this to the developers.

'; +} + +function report_this_text($message) +{ + return $message.'\nPlease report this to the developers at '.$config['project_issues'].'\n'; +} ?> diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index e6b294c5e..495db26c4 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -520,35 +520,6 @@ if(is_file("includes/print-menubar-custom.inc.php")) ?>
  • About
  • + + diff --git a/html/includes/tcpdf/config/tcpdf_config.php b/html/includes/tcpdf/config/tcpdf_config.php index 7000b441f..3fbf4796a 100755 --- a/html/includes/tcpdf/config/tcpdf_config.php +++ b/html/includes/tcpdf/config/tcpdf_config.php @@ -111,32 +111,32 @@ if (!defined('K_TCPDF_EXTERNAL_CONFIG')) { /** * document creator */ - define ('PDF_CREATOR', 'Observium'); + define ('PDF_CREATOR', $config['project_name']); /** * document author */ - define ('PDF_AUTHOR', 'Observium'); + define ('PDF_AUTHOR', $config['project_name']); /** * header title */ - define ('PDF_HEADER_TITLE', 'Observium'); + define ('PDF_HEADER_TITLE', $config['project_name']); /** * header description string */ - define ('PDF_HEADER_STRING', "Observium"); + define ('PDF_HEADER_STRING', $config['project_name']); /** * image logo */ - define ('PDF_HEADER_LOGO', 'observium-logo.png'); + //define ('PDF_HEADER_LOGO', 'observium-logo.png'); /** * header logo image width [mm] */ - define ('PDF_HEADER_LOGO_WIDTH', 110); + //define ('PDF_HEADER_LOGO_WIDTH', 110); /** * document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch] diff --git a/html/index.php b/html/index.php index 63a5ca72e..662e00e5a 100755 --- a/html/index.php +++ b/html/index.php @@ -270,10 +270,10 @@ $runtime_end = utime(); $runtime = $runtime_end - $runtime_start; $gentime = substr($runtime, 0, 5); echo('