Page MenuHomeDevCentral

Get hostname in $HOST or through `hostname`
ClosedPublic

Authored by dereckson on May 31 2023, 15:39.
Tags
None
Referenced Files
F2846909: D3162.id8069.diff
Wed, Apr 24, 11:34
Unknown Object (File)
Sun, Apr 21, 22:34
Unknown Object (File)
Thu, Apr 18, 02:17
Unknown Object (File)
Sun, Apr 14, 13:28
Unknown Object (File)
Tue, Apr 9, 23:24
Unknown Object (File)
Sun, Apr 7, 09:52
Unknown Object (File)
Fri, Apr 5, 18:26
Unknown Object (File)
Fri, Apr 5, 06:54
Subscribers
None

Details

Summary

This covers probably more case:

  • on Linux we've already $HOSTNAME
  • on FreeBSD we can read $HOST
  • on macOS we can call hostname

There is no need to query systemd flavour of hostname, as Linux systems
already publish the environment variable.

Test Plan

Tested on macOS

Diff Detail

Repository
rMD Merge dev dictionaries
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.
This revision is now accepted and ready to land.May 31 2023, 15:40
This revision was landed with ongoing or failed builds.May 31 2023, 15:40
This revision was automatically updated to reflect the committed changes.