[Spacewalk-list] RHN macro to get short hostname

Jørgen Hysvær Langgåt jorgenhl at gmail.com
Wed Dec 19 06:40:25 UTC 2012


On Tue, Dec 18, 2012 at 5:10 PM, Pierre Casenove <pcasenove at gmail.com>wrote:

> Hello list,
> The RHN predefined macro rhn.system.hostname allows you to get the FQDN of
> a client.
> In order to manage the /etc/hosts file on some hosts, I would like to get
> the FQDN and the short name.
> How could I perform this?
>
>
How about "cut -d. -f 1" from the FQDN?

Regards,
Jørgen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20121219/adfb90fb/attachment.htm>


More information about the Spacewalk-list mailing list