mirror of
https://github.com/systemd/systemd.git
synced 2025-05-27 21:05:55 +03:00
test-network: make link_exists() support alternative names
This commit is contained in:
parent
2368ff812d
commit
dee6c26f3e
@ -411,7 +411,7 @@ def create_service_dropin(service, command, reload_command=None, additional_sett
|
||||
create_unit_dropin(f'{service}.service', drop_in)
|
||||
|
||||
def link_exists(link):
|
||||
return os.path.exists(os.path.join('/sys/class/net', link, 'ifindex'))
|
||||
return call_quiet(f'ip link show {link}') == 0
|
||||
|
||||
def remove_link(*links, protect=False):
|
||||
for link in links:
|
||||
|
Loading…
x
Reference in New Issue
Block a user