Skip to content

asahi-diagnose: Use hostnamectl to fetch hostname #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

emberdex
Copy link

A default installation of Asahi Linux doesn't appear to come included with the hostname binary. This causes the hostname lookup to fail when asahi-diagnose is used.

This technically ties the script to systemd, so a better solution if this becomes a concern (i.e. if different init systems are offered in the future) might be to check for the presence of the hostname binary, and if it's not present, go with a sensible alternative value instead of erroring out.

b-crumb and others added 4 commits December 23, 2022 15:21
Signed-off-by: b-crumb <shadow.sandlot.tribute@proton.me>
Signed-off-by: b-crumb <shadow.sandlot.tribute@proton.me>
Signed-off-by: Leif Liddy <leif.liddy@gmail.com>
A default installation of Asahi Linux doesn't appear to come included with the `hostname` binary. This causes the hostname lookup to fail when asahi-diagnose is used.

This technically ties the script to systemd, so a better solution if this becomes a concern (i.e. if different init systems are offered in the future) might be to check for the presence of the `hostname` binary, and if it's not present, go with a sensible alternative value instead of erroring out.

Signed-off-by: Toby Jones <github@monotron.me>
@awilfox
Copy link

awilfox commented Dec 14, 2023

Unfortunately, the script is already tied to systemd, as it calls journalctl to read the kernel boot log. I think those of us wanting to do the integration work on non-systemd distros (Gentoo, Adélie, etc) will need to make a few adjustments.

Would there be support for making this script a bit more modular in that regard?

Copy link
Member

@davide125 davide125 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a bunch of unrelated commits in here, could you rebase it please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants