From 83e2c88f65b39fe2fee0a946d3244cfcc8fbd30b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Sun, 3 Nov 2024 23:07:38 +0100 Subject: [PATCH] powertop2tuned: use default user profile path from the consts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #701 Signed-off-by: Jaroslav Škarvada --- experiments/powertop2tuned.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/experiments/powertop2tuned.py b/experiments/powertop2tuned.py index 25accb7..0b591c2 100755 --- a/experiments/powertop2tuned.py +++ b/experiments/powertop2tuned.py @@ -39,6 +39,7 @@ try: except ImportError: from HTMLParser import HTMLParser from htmlentitydefs import name2codepoint +import tuned.consts as consts SCRIPT_SH = """#!/bin/bash @@ -319,7 +320,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser(description='Creates TuneD profile from Powertop HTML output.') parser.add_argument('profile', metavar='profile_name', type=str, nargs='?', help='Name for the profile to be written.') parser.add_argument('-i', '--input', metavar='input_html', type=str, help='Path to Powertop HTML report. If not given, it is generated automatically.') - parser.add_argument('-o', '--output', metavar='output_directory', type=str, help='Directory where the profile will be written, default is /etc/tuned/profile_name directory.') + parser.add_argument('-o', '--output', metavar='output_directory', type=str, help='Directory where the profile will be written, default is %s/profile_name directory.' % consts.USER_PROFILES_DIR) parser.add_argument('-n', '--new-profile', action='store_true', help='Creates new profile, otherwise it merges (include) your current profile.') parser.add_argument('-m', '--merge-profile', action = 'store', help = 'Merges (includes) the specified profile (can be suppressed by -n option).') parser.add_argument('-f', '--force', action='store_true', help='Overwrites the output directory if it already exists.') @@ -333,7 +334,7 @@ if __name__ == "__main__": sys.exit(-1) if not args['output']: - args['output'] = "/etc/tuned" + args['output'] = consts.USER_PROFILES_DIR if args['profile']: args['output'] = os.path.join(args['output'], args['profile'])