fix: 移除 wsl 模块及 WSL 检测逻辑

This commit is contained in:
2026-04-02 20:57:59 +08:00
parent 064f1dc0bb
commit 0aaf26a529
2 changed files with 0 additions and 31 deletions
-25
View File
@@ -1,25 +0,0 @@
import subprocess
import decman
from decman import Module
class WslModule(Module):
def __init__(self):
super().__init__("wsl")
def after_update(self, store):
try:
result = subprocess.run(
["systemctl", "is-enabled", "systemd-networkd-wait-online.service"],
capture_output=True,
text=True,
)
if result.stdout.strip() != "masked":
decman.prg(
["systemctl", "mask", "systemd-networkd-wait-online.service"]
)
except Exception:
print(
"警告:systemd 不可用,跳过 mask systemd-networkd-wait-online.service"
)