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)
Sat, Sep 28, 04:51
Unknown Object (File)
Sun, Sep 22, 23:46
Unknown Object (File)
Thu, Sep 12, 01:54
Unknown Object (File)
Thu, Sep 12, 01:54
Unknown Object (File)
Thu, Sep 12, 01:46
Unknown Object (File)
Thu, Sep 12, 01:42
Unknown Object (File)
Fri, Sep 6, 23:37
Unknown Object (File)
Mon, Sep 2, 12:11
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.