From dc11fc6b200ffa47a27bfca8b25208528133629b Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Thu, 16 Feb 2012 09:38:37 +0100 Subject: [PATCH] working active_profile DBus method. Profiles now loaded from /usr/lib/tuned --- tuned/controller.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tuned/controller.py b/tuned/controller.py index f4461be..6d906d8 100644 --- a/tuned/controller.py +++ b/tuned/controller.py @@ -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):