summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-06-20 12:49:49 +0200
committerGitHub <noreply@github.com>2024-06-20 12:49:49 +0200
commit109e0940be4956879d3ba074894023a1508424bf (patch)
treed8e59258813366e6e7d19af9d496b73bee31db86 /src
parent9eb1e9bb2b18163afd6bc6a690916537691c95e5 (diff)
parentc0b2693cebc3429e1974a9cec5946fa88ffc0205 (diff)
downloadvyos-1x-109e0940be4956879d3ba074894023a1508424bf.tar.gz
vyos-1x-109e0940be4956879d3ba074894023a1508424bf.zip
Merge pull request #3677 from HollyGurza/T5949
T5949: Add option to disable USB autosuspend
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/system_option.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/system_option.py b/src/conf_mode/system_option.py
index a2e5db575..2c31703e9 100755
--- a/src/conf_mode/system_option.py
+++ b/src/conf_mode/system_option.py
@@ -35,6 +35,7 @@ airbag.enable()
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'
time_format_to_locale = {
'12-hour': 'en_US.UTF-8',
'24-hour': 'en_GB.UTF-8'
@@ -85,6 +86,7 @@ def verify(options):
def generate(options):
render(curlrc_config, 'system/curlrc.j2', options)
render(ssh_config, 'system/ssh_config.j2', options)
+ render(usb_autosuspend, 'system/40_usb_autosuspend.j2', options)
cmdline_options = []
if 'kernel' in options:
@@ -155,6 +157,9 @@ def apply(options):
time_format = time_format_to_locale.get(options['time_format'])
cmd(f'localectl set-locale LC_TIME={time_format}')
+ cmd('udevadm control --reload-rules')
+
+
if __name__ == '__main__':
try:
c = get_config()