Группа :: Система/Настройка/Прочее
Пакет: rex
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: rex-1.14-alt-fix_CMDB_hostname.patch
Скачать
Скачать
Fix CMDB hostname detection
Using server name from 'Rex::get_current_connection()->{conn}->server->to_s'
as a host's hostname is unreliable: it can be either FQDN, or IP,
or name from the SSH config file.
--- ./lib/Rex/CMDB/Base.pm
+++ ./lib/Rex/CMDB/Base.pm
@@ -34,7 +34,7 @@ sub __get_hostname_for {
my $hostname = $server // Rex::get_current_connection()->{conn}->server->to_s;
- if ( $hostname eq '<local>' ) {
+ if ( ($hostname eq '<local>' ) || Rex::is_ssh() ) {
my %hw_info = Rex::Hardware->get('Host');
$hostname = $hw_info{Host}{hostname};
}