From dad1c819fd74fd923f7de683b40fdfe97c87df6a Mon Sep 17 00:00:00 2001 From: Martin Andersson Date: Mon, 15 Aug 2022 12:32:54 +0200 Subject: [PATCH] Don't overwrite /usr/bin/cpufreqctl.auto-cpufreq excessively. (#420) Looks like the behavior of constantly overwriting it was not intended, but introduced inadvertently in a91d4ba36e5f42d025b3978ee1178441b52a372f --- auto_cpufreq/core.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py index faf86c6..9fab1c0 100644 --- a/auto_cpufreq/core.py +++ b/auto_cpufreq/core.py @@ -296,9 +296,7 @@ def cpufreqctl(): pass else: # deploy cpufreqctl.auto-cpufreq script - if os.path.isfile("/usr/bin/cpufreqctl"): - shutil.copy(SCRIPTS_DIR / "cpufreqctl.sh", "/usr/bin/cpufreqctl.auto-cpufreq") - else: + if not os.path.isfile("/usr/bin/cpufreqctl.auto-cpufreq"): shutil.copy(SCRIPTS_DIR / "cpufreqctl.sh", "/usr/bin/cpufreqctl.auto-cpufreq")