asus-fan-control icon indicating copy to clipboard operation
asus-fan-control copied to clipboard

Installation script assumes systemd

Open LoganDark opened this issue 2 years ago • 3 comments

Environment AFC commit 2831af8bf6da841b8f2bdbc9b93e02d0d91ca5a0, AntiX Linux 21, ROG Zephyrus M15 (i7-10750)

Description Installation script (run by gitpack) assumes systemd

Replication Install asus-fan-control on a system without systemd, it will try to install service files and use systemctl.

Luckily it still succeeds despite this.

Additional context N/A

LoganDark avatar May 21 '22 06:05 LoganDark

Hello @LoganDark Truth be told; AFC does not require systemd to work. The (un)installation script was written with that in mind (it is pretty tolerant).

However, since systemd is pretty popular these days, AFC utilizes it to keep the effect of a permanent change in the fan behavior, and we can say this is the desired and expected AFC behavior. The previous solution was /etc/rc.local, which was way less portable (see #9 for more information).

What is your expected behavior or solution?

dominiksalvet avatar May 23 '22 19:05 dominiksalvet

AFC does not require systemd to work

Aware :)

What is your expected behavior or solution?

Just check for the existence of systemctl before trying to use it. Print a notice if it's not found.

LoganDark avatar May 24 '22 02:05 LoganDark

Are you able to prepare a PR on this?

dominiksalvet avatar May 24 '22 08:05 dominiksalvet

Are you able to prepare a PR on this?

Sorry, I completely missed this comment-- I tinker with Linux every now and then but I quickly run out of energy to deal with it because it's always really annoying. I guess you just reached me at a time when my energy was depleted. :(

Maybe one day

LoganDark avatar Sep 11 '22 21:09 LoganDark

It is okay. I have also changed my mind about this issue since the behavior is appropriate. The systemd service does not only care about running AFC but it also cares about loading the ACPI module... However, I will not let the installation script fail when systemd is not present so people can still install AFC using GitPack.

dominiksalvet avatar Sep 11 '22 21:09 dominiksalvet