This commit is contained in:
1 parent
e20141043c
commit
c3de4386ab
3 files changed
+22
-2
No files matched your search
@@ -757,3 +757,12 @@ func (h *Host) DetectOS(opts *ConfigOpts) (string, error) {
|
||||
osName := string(output)
|
||||
return osName, nil
|
||||
}
|
||||
|
||||
func CheckIfHostHasHostName(host string) (bool, string) {
|
||||
HostName, err := ssh_config.DefaultUserSettings.GetStrict(host, "HostName")
|
||||
if err != nil {
|
||||
return false, ""
|
||||
}
|
||||
println(HostName)
|
||||
return HostName != "", HostName
|
||||
}
|
||||
Reference in new issue
Block a user