diff options
author | Christian Breunig <christian@breunig.cc> | 2023-07-12 21:25:10 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2023-07-12 21:26:25 +0200 |
commit | ac60fe7d1840b8768542ee4b3f28f46544c290f2 (patch) | |
tree | 37a62d5dbdefe67b0050846a388e9949f1a14da2 /python | |
parent | 4e2a087cc7e91a510dd590f7cc761e36ac8f77f8 (diff) | |
download | vyos-1x-ac60fe7d1840b8768542ee4b3f28f46544c290f2.tar.gz vyos-1x-ac60fe7d1840b8768542ee4b3f28f46544c290f2.zip |
T5195: drop sysctl_* implementation from vyos.util - prefer vyos.utils.system
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/util.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/python/vyos/util.py b/python/vyos/util.py index bd47940bb..fac3a920b 100644 --- a/python/vyos/util.py +++ b/python/vyos/util.py @@ -1130,20 +1130,6 @@ def is_wwan_connected(interface): # return True/False if interface is in connected state return dict_search('modem.generic.state', tmp) == 'connected' -def sysctl_read(name): - """ Read and return current value of sysctl() option """ - tmp = cmd(f'sysctl {name}') - return tmp.split()[-1] - -def sysctl_write(name, value): - """ Change value via sysctl() - return True if changed, False otherwise """ - tmp = cmd(f'sysctl {name}') - # last list index contains the actual value - only write if value differs - if sysctl_read(name) != str(value): - call(f'sysctl -wq {name}={value}') - return True - return False - def load_as_module(name: str, path: str): import importlib.util |