disable updates with optional param

pull/1807/head
George Hotz 5 years ago
parent 1036c68251
commit 1bf15309f3
  1. 1
      common/params.py
  2. 3
      selfdrive/updated.py

@ -60,6 +60,7 @@ keys = {
"CompletedTrainingVersion": [TxType.PERSISTENT],
"ControlsParams": [TxType.PERSISTENT],
"DisablePowerDown": [TxType.PERSISTENT],
"DisableUpdates": [TxType.PERSISTENT],
"DoUninstall": [TxType.CLEAR_ON_MANAGER_START],
"DongleId": [TxType.PERSISTENT],
"GitBranch": [TxType.PERSISTENT],

@ -319,6 +319,9 @@ def main():
wait_helper = WaitTimeHelper()
params = Params()
if params.get("DisableUpdates") == b"1":
raise RuntimeError("updates are disabled by param")
if not os.geteuid() == 0:
raise RuntimeError("updated must be launched as root!")

Loading…
Cancel
Save