added option to detect if running on snap
This commit is contained in:
parent
ee813abfdd
commit
c78ea8dd59
|
@ -4,6 +4,7 @@
|
|||
#
|
||||
# Blog post: http://foolcontrol.org/?p=3124
|
||||
|
||||
# core import
|
||||
import sys
|
||||
sys.path.append('../')
|
||||
from source.core import *
|
||||
|
|
|
@ -31,10 +31,6 @@ parts:
|
|||
source: scripts
|
||||
organize:
|
||||
cpufreqctl.sh: usr/bin/cpufreqctl
|
||||
# organize:
|
||||
# auto-cpufreq-install.sh: usr/bin/auto-cpufreq-install
|
||||
# organize:
|
||||
# auto-cpufreq-remove.sh: usr/bin/auto-cpufreq-remove
|
||||
|
||||
apps:
|
||||
auto-cpufreq:
|
||||
|
@ -42,3 +38,4 @@ apps:
|
|||
environment:
|
||||
LC_ALL: C.UTF-8
|
||||
LANG: C.UTF-8
|
||||
PKG_MARKER: SNAP
|
|
@ -37,6 +37,10 @@ auto_cpufreq_log_file = "/var/log/auto-cpufreq.log"
|
|||
|
||||
# deploy cpufreqctl script
|
||||
def cpufreqctl():
|
||||
# detect if running on a SNAP
|
||||
if os.getenv('PKG_MARKER') == "SNAP":
|
||||
pass
|
||||
else:
|
||||
# deploy cpufreqctl script (if missing)
|
||||
if os.path.isfile("/usr/bin/cpufreqctl"):
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue