Page MenuHomeDevCentral

Get hostname in $HOST or through `hostname`
ClosedPublic

Authored by dereckson on May 31 2023, 15:39.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 05:20
Unknown Object (File)
Mon, Oct 21, 00:06
Unknown Object (File)
Oct 14 2024, 08:01
Unknown Object (File)
Oct 14 2024, 04:18
Unknown Object (File)
Oct 14 2024, 04:18
Unknown Object (File)
Oct 14 2024, 04:17
Unknown Object (File)
Oct 14 2024, 04:17
Unknown Object (File)
Oct 14 2024, 01:26
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.