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.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/conf_mode/system-options.py b/src/conf_mode/system-options.py
index 4c809d044..74c34e19f 100755
--- a/src/conf_mode/system-options.py
+++ b/src/conf_mode/system-options.py
@@ -24,6 +24,7 @@ from vyos import ConfigError
systemd_ctrl_alt_del = '/lib/systemd/system/ctrl-alt-del.target'
default_config_data = {
+ 'beep_if_fully_booted': False,
'ctrl_alt_del': 'ignore',
'reboot_on_panic': True
}
@@ -36,6 +37,7 @@ def get_config():
if conf.exists('ctrl-alt-del-action'):
opt['ctrl_alt_del'] = conf.return_value('ctrl-alt-del-action')
+ opt['beep_if_fully_booted'] = conf.exists('beep-if-fully-booted')
opt['reboot_on_panic'] = conf.exists('reboot-on-panic')
return opt
@@ -47,6 +49,11 @@ def generate(opt):
pass
def apply(opt):
+ # Beep action
+ if opt['beep_if_fully_booted']:
+ os.system('systemctl enable vyos-beep.service >/dev/null 2>&1')
+ else:
+ os.system('systemctl disable vyos-beep.service >/dev/null 2>&1')
# Ctrl-Alt-Delete action
if opt['ctrl_alt_del'] == 'ignore':