From 132b0a424730fca39e1ea3b3ab5c177ec330a057 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 24 Jul 2020 21:29:19 +0200 Subject: wireless: use library function for loading kernel modules --- scripts/cli/test_interfaces_wireless.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/cli/test_interfaces_wireless.py b/scripts/cli/test_interfaces_wireless.py index 5d04a1c44..ff293ac84 100755 --- a/scripts/cli/test_interfaces_wireless.py +++ b/scripts/cli/test_interfaces_wireless.py @@ -18,6 +18,7 @@ import os import unittest from base_interfaces_test import BasicInterfaceTest +from vyos.util import check_kmod class WirelessInterfaceTest(BasicInterfaceTest.BaseTest): def setUp(self): @@ -47,8 +48,6 @@ class WirelessInterfaceTest(BasicInterfaceTest.BaseTest): # commit changes self.session.commit() - - if __name__ == '__main__': - os.system('sudo modprobe mac80211_hwsim') + check_kmod('mac80211_hwsim') unittest.main() -- cgit v1.2.3