1
0
Fork 0

working active_profile DBus method. Profiles now loaded from /usr/lib/tuned

This commit is contained in:
Jan Kaluza 2012-02-16 09:38:37 +01:00
parent 67dc506e38
commit dc11fc6b20

View file

@ -100,7 +100,7 @@ class Controller(exports.interfaces.ExportableInterface):
@exports.export("s", "b")
def switch_profile(self, profile):
cfg = "/etc/tune-profiles/%s/tuned.conf" % (profile)
cfg = "/usr/lib/tuned/%s/tuned.conf" % (profile)
try:
self.config_file = cfg
except ValueError as e:
@ -111,7 +111,9 @@ class Controller(exports.interfaces.ExportableInterface):
@exports.export("", "s")
def active_profile(self):
return "default"
if self.config_file.startswith("/usr/lib/tuned/"):
return self.config_file.split("/")[-2]
return self.config_file
@exports.export("", "a{bb}")
def status(self):