diff options
author | Christian Breunig <christian@breunig.cc> | 2024-08-24 21:55:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-24 21:55:38 +0200 |
commit | 190ae20824784271376c74eb9d6685155bc29cd8 (patch) | |
tree | 4040e61f35af5b7562b86c8694e93b09e5325d16 /src/conf_mode/system_option.py | |
parent | 6f4bbbac4eaa16327b174e6231993000f33a121f (diff) | |
parent | 092c922cfbec7ee82878fa5d22c5c016af01b60d (diff) | |
download | vyos-1x-190ae20824784271376c74eb9d6685155bc29cd8.tar.gz vyos-1x-190ae20824784271376c74eb9d6685155bc29cd8.zip |
Merge pull request #4011 from vyos/mergify/bp/circinus/pr-3945
sysctl: T3204: restore sysctl settings overwritten by tuned (backport #3945)
Diffstat (limited to 'src/conf_mode/system_option.py')
-rwxr-xr-x | src/conf_mode/system_option.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/conf_mode/system_option.py b/src/conf_mode/system_option.py index 5b593335e..6aaf3d107 100755 --- a/src/conf_mode/system_option.py +++ b/src/conf_mode/system_option.py @@ -31,7 +31,8 @@ from vyos.utils.process import cmd from vyos.utils.process import is_systemd_service_running from vyos.utils.network import is_addr_assigned from vyos.utils.network import is_intf_addr_assigned -from vyos.configdep import set_dependents, call_dependents +from vyos.configdep import set_dependents +from vyos.configdep import call_dependents from vyos import ConfigError from vyos import airbag airbag.enable() @@ -57,10 +58,9 @@ def get_config(config=None): with_recursive_defaults=True) if 'performance' in options: - # Update IPv4 and IPv6 options after TuneD reapplies - # sysctl from config files - for protocol in ['ip', 'ipv6']: - set_dependents(protocol, conf) + # Update IPv4/IPv6 and sysctl options after tuned applied it's settings + set_dependents('ip_ipv6', conf) + set_dependents('sysctl', conf) return options @@ -113,10 +113,11 @@ def generate(options): def apply(options): # System bootup beep + beep_service = 'vyos-beep.service' if 'startup_beep' in options: - cmd('systemctl enable vyos-beep.service') + cmd(f'systemctl enable {beep_service}') else: - cmd('systemctl disable vyos-beep.service') + cmd(f'systemctl disable {beep_service}') # Ctrl-Alt-Delete action if os.path.exists(systemd_action_file): |