On Wed, 11 Jan 2023 11:02:24 +0000 Gaurav Kumar <[email protected]> wrote:
> Hello Team, > > Is there any API in YaST to resolve the short hostname to get resolvable > fully qualified domain name (FQDN) ? > > For example, if the short hostname is set to server1, then how do we get the > resolvable name of server1.example.com > I have gone through the yast2-network module and was not able to find any > suitable API specific for the above task. > > Is there any YaST call present which I can utilize. > > Regards, > Gaurav Hi Gaurav, I am not sure I fully understand question, but if you want to know your fqdn that I suggest to check code in hostname reader at https://github.com/yast/yast-network/blob/master/src/lib/y2network/wicked/hostname_reader.rb If you want to get fqdn from another hostname, but in your domain then I think you can use splitQN method also used in hostname reader to get your domain and join it. If you do not know domain, then I do not see any way how to know it. Josef
