diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-08-13 18:31:08 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-08-15 15:02:00 +0000 |
commit | b082a6fb211ef19d75c4c81414be9aa1b9248b45 (patch) | |
tree | 85ee394234198a669c4be22cc97f1e2f3ab5050b /src/conf_mode/interfaces-wirelessmodem.py | |
parent | 8efb8ba1efa9d51ec376bac0bfcb48cf200447a9 (diff) | |
download | vyos-1x-b082a6fb211ef19d75c4c81414be9aa1b9248b45.tar.gz vyos-1x-b082a6fb211ef19d75c4c81414be9aa1b9248b45.zip |
lcd: T2564: flatten CLI interface
* set system lcd device <device>
* set system lcd model <modeml>
Both device and model have completion helpers for supported interfaces and LCD
displays.
Diffstat (limited to 'src/conf_mode/interfaces-wirelessmodem.py')
-rwxr-xr-x | src/conf_mode/interfaces-wirelessmodem.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/conf_mode/interfaces-wirelessmodem.py b/src/conf_mode/interfaces-wirelessmodem.py index 4081be3c9..6d168d918 100755 --- a/src/conf_mode/interfaces-wirelessmodem.py +++ b/src/conf_mode/interfaces-wirelessmodem.py @@ -16,7 +16,6 @@ import os -from fnmatch import fnmatch from sys import exit from vyos.config import Config @@ -25,22 +24,13 @@ from vyos.configverify import verify_vrf from vyos.template import render from vyos.util import call from vyos.util import check_kmod +from vyos.util import find_device_file from vyos import ConfigError from vyos import airbag airbag.enable() k_mod = ['option', 'usb_wwan', 'usbserial'] -def find_device_file(device): - """ Recurively search /dev for the given device file and return its full path. - If no device file was found 'None' is returned """ - for root, dirs, files in os.walk('/dev'): - for basename in files: - if fnmatch(basename, device): - return os.path.join(root, basename) - - return None - def get_config(): """ Retrive CLI config as dictionary. Dictionary can never be empty, as at least the |