summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-06-24 14:10:23 +0200
committerChristian Breunig <christian@breunig.cc>2024-06-24 14:10:23 +0200
commit5b0faeedb870d3f9cac7acbcdfc23e5559689123 (patch)
treed534ed7892f95397a56cfaf38a5198ec4a0b6435 /src/conf_mode
parent8479f0d8ab6d50a4e93c60a8ed64815f2f1e3539 (diff)
downloadvyos-1x-5b0faeedb870d3f9cac7acbcdfc23e5559689123.tar.gz
vyos-1x-5b0faeedb870d3f9cac7acbcdfc23e5559689123.zip
T3202: add single variable for Kernel dynamic debug settings
(cherry picked from commit 9495f904fcc157521ca001ee21cf31be28a6b3a0)
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/system_option.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/conf_mode/system_option.py b/src/conf_mode/system_option.py
index 56d608569..571ce55ec 100755
--- a/src/conf_mode/system_option.py
+++ b/src/conf_mode/system_option.py
@@ -39,6 +39,7 @@ curlrc_config = r'/etc/curlrc'
ssh_config = r'/etc/ssh/ssh_config.d/91-vyos-ssh-client-options.conf'
systemd_action_file = '/lib/systemd/system/ctrl-alt-del.target'
usb_autosuspend = r'/etc/udev/rules.d/40-usb-autosuspend.rules'
+kernel_dynamic_debug = r'/sys/kernel/debug/dynamic_debug/control'
time_format_to_locale = {
'12-hour': 'en_US.UTF-8',
'24-hour': 'en_GB.UTF-8'
@@ -160,6 +161,7 @@ def apply(options):
time_format = time_format_to_locale.get(options['time_format'])
cmd(f'localectl set-locale LC_TIME={time_format}')
+ # Reload UDEV, required for USB auto suspend
cmd('udevadm control --reload-rules')
# Enable/disable dynamic debugging for kernel modules
@@ -168,9 +170,9 @@ def apply(options):
for module in modules:
if module in modules_enabled:
check_kmod(module)
- write_file('/sys/kernel/debug/dynamic_debug/control', f'module {module} +p')
+ write_file(kernel_dynamic_debug, f'module {module} +p')
else:
- write_file('/sys/kernel/debug/dynamic_debug/control', f'module {module} -p')
+ write_file(kernel_dynamic_debug, f'module {module} -p')
if __name__ == '__main__':
try: