Page MenuHomeDevCentral

Get hostname in $HOST or through `hostname`
ClosedPublic

Authored by dereckson on May 31 2023, 15:39.
Tags
None
Referenced Files
F3767668: D3162.diff
Sat, Nov 23, 02:42
F3766400: D3162.id8068.diff
Fri, Nov 22, 18:07
Unknown Object (File)
Fri, Nov 22, 03:30
Unknown Object (File)
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
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 Errors
SeverityLocationCodeMessage
Errorsrc/mergedictionaries/sources/git.py:92E501flake8 E501
Errorsrc/mergedictionaries/sources/git.py:97E501flake8 E501
Unit
No Test Coverage
Branch
main
Build Status
Buildable 4988
Build 5269: arc lint + arc unit

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.