summaryrefslogtreecommitdiff
path: root/src/conf_mode/system-options.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode/system-options.py')
-rwxr-xr-xsrc/conf_mode/system-options.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/conf_mode/system-options.py b/src/conf_mode/system-options.py
index 6ac35a4ab..22765cef7 100755
--- a/src/conf_mode/system-options.py
+++ b/src/conf_mode/system-options.py
@@ -21,7 +21,7 @@ from sys import exit
from vyos.config import Config
from vyos.template import render
-from vyos.util import call
+from vyos.util import cmd
from vyos.validate import is_addr_assigned
from vyos import ConfigError
from vyos import airbag
@@ -71,9 +71,9 @@ def generate(options):
def apply(options):
# Beep action
if 'beep_if_fully_booted' in options.keys():
- call('systemctl enable vyos-beep.service')
+ cmd('systemctl enable vyos-beep.service')
else:
- call('systemctl disable vyos-beep.service')
+ cmd('systemctl disable vyos-beep.service')
# Ctrl-Alt-Delete action
if os.path.exists(systemd_action_file):
@@ -100,6 +100,13 @@ def apply(options):
else:
f.write('0')
+ # tuned - performance tuning
+ if 'performance' in options:
+ cmd('systemctl enable tuned.service')
+ cmd('tuned-adm profile network-{performance}'.format(**options))
+ else:
+ cmd('systemctl disable tuned.service')
+
if __name__ == '__main__':
try:
c = get_config()