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)
Thu, Jan 23, 21:30
Unknown Object (File)
Wed, Jan 22, 06:35
Unknown Object (File)
Thu, Jan 16, 21:04
Unknown Object (File)
Sat, Jan 11, 10:47
Unknown Object (File)
Dec 31 2024, 18:23
Unknown Object (File)
Dec 27 2024, 21:53
Unknown Object (File)
Dec 27 2024, 16:17
Unknown Object (File)
Dec 15 2024, 21:58
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.