mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-01 11:32:21 +08:00
tici: only write eSIM connection once
This commit is contained in:
@@ -505,8 +505,8 @@ class Tici(HardwareBase):
|
||||
pass
|
||||
|
||||
# eSIM prime
|
||||
if sim_id.startswith('8985235'):
|
||||
dest = "/etc/NetworkManager/system-connections/esim.nmconnection"
|
||||
dest = "/etc/NetworkManager/system-connections/esim.nmconnection"
|
||||
if sim_id.startswith('8985235') and not os.path.exists(dest):
|
||||
with open(Path(__file__).parent/'esim.nmconnection') as f, tempfile.NamedTemporaryFile(mode='w') as tf:
|
||||
dat = f.read()
|
||||
dat = dat.replace("sim-id=", f"sim-id={sim_id}")
|
||||
|
||||
Reference in New Issue
Block a user