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

Resolve permission errors for --install, --remove, and cpufreqctl.auto-cpufreq on Ubuntu 24.04 #762

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions auto_cpufreq/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ def cpufreqctl():
"""
if not (IS_INSTALLED_WITH_SNAP or os.path.isfile("/usr/local/bin/cpufreqctl.auto-cpufreq")):
copy(SCRIPTS_DIR / "cpufreqctl.sh", "/usr/local/bin/cpufreqctl.auto-cpufreq")
call(["chmod", "a+x", "/usr/local/bin/cpufreqctl.auto-cpufreq"])

def cpufreqctl_restore():
"""
Expand Down Expand Up @@ -317,9 +318,11 @@ def deploy_daemon():

print("\n* Deploy auto-cpufreq install script")
copy(SCRIPTS_DIR / "auto-cpufreq-install.sh", "/usr/local/bin/auto-cpufreq-install")
call(["chmod", "a+x", "/usr/local/bin/auto-cpufreq-install"])

print("\n* Deploy auto-cpufreq remove script")
copy(SCRIPTS_DIR / "auto-cpufreq-remove.sh", "/usr/local/bin/auto-cpufreq-remove")
call(["chmod", "a+x", "/usr/local/bin/auto-cpufreq-remove"])

# output warning if gnome power profile is running
gnome_power_detect_install()
Expand Down