Skip to content
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

Arch Linux support for install_prereq.sh #890

Merged
merged 7 commits into from
Nov 6, 2023

Conversation

C0rn3j
Copy link
Contributor

@C0rn3j C0rn3j commented Jan 4, 2021

I edited the script to detect OS (and fallback to debian-based install should detection fail) and added a relevant function for Arch Linux (and possibly its derivatives).

I have changed installing the pip modules as current user(root), not system-wide, as that conflicts with the system package manager.

I looked where the pip dependencies are used and it looks like they're all called from sudo screen, so installing as root user should be correct.

Tested with Ubuntu 20.10 and Arch.

EDIT: Went through with the flash on Arch successfully, but had to disable NM as it was interfering with the AP script, added note to the setup while I was at it.

@jmiahman
Copy link

jmiahman commented Jan 4, 2021

The Network Manager service is also called NetworkManager on most Red Hat based distributions as well. It would be nice if there was a check for it (ie. check if network-manager or NetworkManager is a running service) to make the script was a tad more dynamic. I have no issues writing it and submitting a PR if that is something that will be accepted.

@kueblc
Copy link
Collaborator

kueblc commented Jan 26, 2021

Hi @C0rn3j, thanks for your contribution! I'll switch the base branch to development which is currently staging for the next release.

Regarding NetworkManager @C0rn3j and @jmiahman, this should already be handled automatically. If this is not working then that is an issue unto itself. See the relevant code here and let me know how we can improve. I will gladly take a PR for this.

The rest looks good to me, though I'm not able to test comprehensively.

@kueblc kueblc changed the base branch from master to development January 26, 2021 22:23
@C0rn3j
Copy link
Contributor Author

C0rn3j commented Jan 26, 2021

Fixed the conflict due to rfkill being added (in util-linux on Arch), hopefully correctly.

EDIT: Looks like the NM code is missing a check for NetworkManager service (currently only does network-manager), I'll look into it after this gets merged, that is if I'm not beat by @jmiahman

This was referenced Jan 29, 2021
@C0rn3j
Copy link
Contributor Author

C0rn3j commented Aug 1, 2022

@kueblc
I fixed the conflict that popped up a while ago, could you please pull this? I did test it when I originally made the commit.

Tried to test it now again but unfortunately it seems that newer version of BW-SHP6 Pro and other devices now do not ship with ESP8266 anymore...

EDIT: I've actually found out why I initially had to stop NetworkManager myself - the script was relying on the ancient service binary to exist, which it does not on systemd.

Both Arch and Ubuntu have been using systemd for ages, and systemctl is used for control elsewhere, so I assume it was a mistake and switched the rest of the commands over to systemctl.

@Sabin-Gheorghiu
Copy link

Can this be merged?

@kueblc kueblc merged commit 17e5021 into ct-Open-Source:development Nov 6, 2023
@kueblc
Copy link
Collaborator

kueblc commented Nov 6, 2023

Thanks for your contribution! I haven't had a chance to test but LGTM so it's now on dev branch

@C0rn3j
Copy link
Contributor Author

C0rn3j commented Nov 6, 2023

Side note, the latest commit can be improved to first try stopping NetworkManager and not network-manager, as network-manager is the old name, so it'd be best to try with the new name first instead to avoid needlessly spamming logs.

Thanks for pulling it!

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.

4 participants