Page MenuHomeDevCentral

Get hostname in $HOST or through `hostname`
ClosedPublic

Authored by dereckson on May 31 2023, 15:39.
Tags
None
Referenced Files
F3766400: D3162.id8068.diff
Fri, Nov 22, 18:07
F3763944: D3162.diff
Fri, Nov 22, 03:30
F3763349: D3162.id8068.diff
Thu, Nov 21, 23:03
Unknown Object (File)
Wed, Nov 20, 21:10
Unknown Object (File)
Sun, Nov 17, 20:44
Unknown Object (File)
Tue, Nov 5, 05:20
Unknown Object (File)
Oct 21 2024, 00:06
Unknown Object (File)
Oct 14 2024, 08:01
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.