From ac60fe7d1840b8768542ee4b3f28f46544c290f2 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Wed, 12 Jul 2023 21:25:10 +0200 Subject: T5195: drop sysctl_* implementation from vyos.util - prefer vyos.utils.system --- python/vyos/util.py | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'python') 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 -- cgit v1.2.3