mutations require reboot today

pull/35314/head
Trey Moen 3 months ago
parent fc7643f0c2
commit 1eea0c240d
  1. 14
      system/hardware/tici/esim.py

@ -145,10 +145,13 @@ if __name__ == "__main__":
lpa = LPA() lpa = LPA()
if args.enable: if args.enable:
lpa.enable_profile(args.enable) lpa.enable_profile(args.enable)
print('enabled profile, please restart device to apply changes')
elif args.disable: elif args.disable:
lpa.disable_profile(args.disable) lpa.disable_profile(args.disable)
print('disabled profile, please restart device to apply changes')
elif args.delete: elif args.delete:
lpa.delete_profile(args.delete) lpa.delete_profile(args.delete)
print('deleted profile, please restart device to apply changes')
elif args.download: elif args.download:
lpa.download_profile(args.download[0], args.download[1]) lpa.download_profile(args.download[0], args.download[1])
elif args.nickname: elif args.nickname:
@ -158,14 +161,3 @@ if __name__ == "__main__":
print(f'{len(profiles)} profile{"s" if len(profiles) > 1 else ""}:') print(f'{len(profiles)} profile{"s" if len(profiles) > 1 else ""}:')
for p in profiles: for p in profiles:
print(f'- {p.iccid} (nickname: {p.nickname or "no nickname"}) (provider: {p.provider}) - {"enabled" if p.enabled else "disabled"}') print(f'- {p.iccid} (nickname: {p.nickname or "no nickname"}) (provider: {p.provider}) - {"enabled" if p.enabled else "disabled"}')
if args.reboot:
print('restarting modem')
subprocess.check_call("sudo systemctl stop ModemManager", shell=True)
subprocess.check_call("/usr/comma/lte/lte.sh stop_blocking", shell=True)
subprocess.check_call("/usr/comma/lte/lte.sh start", shell=True)
while not os.path.exists('/dev/ttyUSB2'):
time.sleep(1)
print('reconfiguring connection')
tici = Tici()
tici.configure_modem()

Loading…
Cancel
Save