summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Mazoyer <gmazoyer@gravitons.in>2015-07-18 18:56:16 +0200
committerGuillaume Mazoyer <gmazoyer@gravitons.in>2015-07-18 18:56:16 +0200
commit6e9a4fb7765dda39656d1e95a743de1f79aab3b2 (patch)
treeec2bc7676556af5540e14aaf12db5902c78e545e
parent0299cfd753fb468e20605c62e4147c77529e0aae (diff)
Change some errors messages.
-rw-r--r--auth/ssh.php8
-rw-r--r--auth/telnet.php2
-rw-r--r--includes/config.defaults.php2
3 files changed, 6 insertions, 6 deletions
diff --git a/auth/ssh.php b/auth/ssh.php
index d8d56a1..e4d22a2 100644
--- a/auth/ssh.php
+++ b/auth/ssh.php
@@ -35,13 +35,13 @@ final class SSH extends Authentication {
protected function check_config() {
if ($this->config['auth'] == 'ssh-password') {
if (!isset($this->config['user']) || !isset($this->config['pass'])) {
- throw new Exception('User and password required for ssh-password.');
+ throw new Exception('Router authentication configuration incomplete.');
}
}
if ($this->config['auth'] == 'ssh-key') {
if (!isset($this->config['user']) || !isset($this->config['private_key'])) {
- throw new Exception('User and private key required for ssh-key.');
+ throw new Exception('Router authentication configuration incomplete.');
}
}
}
@@ -62,11 +62,11 @@ final class SSH extends Authentication {
$success = $this->connection->login($this->config['user'], $key);
} else {
- throw new Exception('Unknown type of connection for SSH.');
+ throw new Exception('Unknown type of connection.');
}
if (!$success) {
- throw new Exception('SSH authentication failed.');
+ throw new Exception('Cannot connect to router.');
}
}
diff --git a/auth/telnet.php b/auth/telnet.php
index 2f3465d..15052ec 100644
--- a/auth/telnet.php
+++ b/auth/telnet.php
@@ -32,7 +32,7 @@ final class Telnet extends Authentication {
protected function check_config() {
if (!isset($this->config['user']) || !isset($this->config['pass'])) {
- throw new Exception('User and password required for telnet.');
+ throw new Exception('Router authentication configuration incomplete.');
}
}
diff --git a/includes/config.defaults.php b/includes/config.defaults.php
index 5aa9e39..bd1687f 100644
--- a/includes/config.defaults.php
+++ b/includes/config.defaults.php
@@ -100,7 +100,7 @@ $config = array(
'ping_options' => '-A -c 10',
// Source option to use when pinging
'ping_source_option' => '-I',
- // Traceroute tool to be used (can be traceroute or mtr)
+ // Traceroute tool to be used
'traceroute4' => 'traceroute -4',
'traceroute6' => 'traceroute -6',
// Options to be used when tracerouting from a UNIX host (case of BIRD