diff --git a/frontend/classes/class.node.php b/frontend/classes/class.node.php index 5ca3633..f842952 100644 --- a/frontend/classes/class.node.php +++ b/frontend/classes/class.node.php @@ -74,7 +74,7 @@ class Node extends CPHPDatabaseRecordClass public function GetHostname() { - return $this->ssh->RunCommandCached("hostname")->stdout; + return $this->ssh->RunCommandCached("hostname2", true)->stdout; } } diff --git a/frontend/classes/class.sshconnector.php b/frontend/classes/class.sshconnector.php index b9114a9..d60fefb 100644 --- a/frontend/classes/class.sshconnector.php +++ b/frontend/classes/class.sshconnector.php @@ -30,7 +30,7 @@ class SshConnector extends CPHPBaseClass private $cache = ""; - public function RunCommand($command, $throw_exception) + public function RunCommand($command, $throw_exception = false) { try { @@ -56,7 +56,7 @@ class SshConnector extends CPHPBaseClass } } - public function RunCommandCached($command, $throw_exception) + public function RunCommandCached($command, $throw_exception = false) { if(!isset($this->cache[$command])) { diff --git a/frontend/includes/include.exceptions.php b/frontend/includes/include.exceptions.php index e975043..c7f0f8d 100644 --- a/frontend/includes/include.exceptions.php +++ b/frontend/includes/include.exceptions.php @@ -14,4 +14,5 @@ class SshConnectException extends Exception {} class SshAuthException extends Exception {} class SshCommandException extends Exception {} +class SshExitException extends Exception {} ?>