Skip to content

Commit 01129e8

Browse files
texasaggie97amstewart
authored andcommitted
Update WiFi configuration messages for clarity and accuracy
Signed-off-by: Mark Silva <mark.silva@emerson.com>
1 parent c41605d commit 01129e8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

nilrt_snac/_configs/_wifi_config.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def __init__(self):
1313
pass
1414

1515
def configure(self, args: argparse.Namespace) -> None:
16-
print("Configuring WiFi configuration...")
16+
print("Disabling WiFi support...")
1717
config_file = _ConfigFile("/etc/modprobe.d/snac_blacklist.conf")
1818
dry_run: bool = args.dry_run
1919
if not config_file.contains_exact("install cfg80211 /bin/true"):
@@ -37,13 +37,17 @@ def configure(self, args: argparse.Namespace) -> None:
3737
subprocess.run(["rmmod", "cfg80211", "mac80211"], check=False)
3838

3939
def verify(self, args: argparse.Namespace) -> bool:
40-
print("Verifying WiFi configuration...")
40+
print("Verifying WiFi support disabled...")
4141
config_file = _ConfigFile("/etc/modprobe.d/snac_blacklist.conf")
4242
valid = True
4343
if not config_file.exists():
4444
valid = False
4545
logger.error(f"MISSING: {config_file.path} not found")
46-
elif not config_file.contains_exact("install cfg80211 /bin/true"):
46+
if not config_file.contains_exact("install cfg80211 /bin/true"):
4747
valid = False
48-
logger.error("MISSING: commands to fail install of WiFi modules")
48+
logger.error(
49+
"MISSING: The line 'install cfg80211 /bin/true' was not found in "
50+
f"{config_file.path}. This command is required to prevent WiFi kernel modules from loading. "
51+
"Please ensure the file contains the necessary 'install' directives to fully disable WiFi support."
52+
)
4953
return valid

0 commit comments

Comments
 (0)