Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

powertop2tuned: use default user profile path from the consts #703

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions experiments/powertop2tuned.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
except ImportError:
from HTMLParser import HTMLParser
from htmlentitydefs import name2codepoint
import tuned.consts as consts


SCRIPT_SH = """#!/bin/bash
Expand Down Expand Up @@ -319,7 +320,7 @@ def generate(self, new_profile, merge_profile, enable_tunings):
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.')
Expand All @@ -333,7 +334,7 @@ def generate(self, new_profile, merge_profile, enable_tunings):
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'])
Expand Down
Loading