diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-10-01 10:14:48 +0200 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-10-01 15:32:54 +0200 |
commit | e30e934272f16e3fa60454c37692034064a33a5c (patch) | |
tree | 1ce5a32c25581a201d2129a1aa55f4cf53acd1bc /src/utils/menu.py | |
parent | 8f437bb954266d1da31c7044edcdc2d9f4cef540 (diff) |
src: replace DEVICE env variable with get_ethernet_interface()
Use a python function to obtain the main net interface. Detect
the first ethernet inferface in use.
Stop using the DEVICE environment variable.
Diffstat (limited to 'src/utils/menu.py')
-rw-r--r-- | src/utils/menu.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/menu.py b/src/utils/menu.py index 48e2641..b615d6f 100644 --- a/src/utils/menu.py +++ b/src/utils/menu.py @@ -13,7 +13,7 @@ Utility module for ogBrowser menu generation import os import socket -from src.utils.net import getifaddr, getifhwaddr, ethtool +from src.utils.net import * MENU_TEMPLATE = """ <div align="center" style="font-family: Arial, Helvetica, sans-serif;"> @@ -39,7 +39,7 @@ def generate_menu(part_setup): Writes html menu to /opt/opengnsys/log/{ip}.info.html based on a partition setup """ - device = os.getenv('DEVICE') + device = get_ethernet_interface() if not device: return False |