Add an SSH param to disable updates (#1807)
* disable updates with optional param * dont create the alert * Revert "dont create the alert" This reverts commit 7179a6c8b4b4656e0b203b5a590b33d3388aa9c9. * keep alert, but allow engagement Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>albatross
parent
1036c68251
commit
cb495bb8c9
|
@ -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],
|
||||
|
|
|
@ -72,7 +72,7 @@ class Controls:
|
|||
params = Params()
|
||||
self.is_metric = params.get("IsMetric", encoding='utf8') == "1"
|
||||
self.is_ldw_enabled = params.get("IsLdwEnabled", encoding='utf8') == "1"
|
||||
internet_needed = params.get("Offroad_ConnectivityNeeded", encoding='utf8') is not None
|
||||
internet_needed = (params.get("Offroad_ConnectivityNeeded", encoding='utf8') is not None) and (params.get("DisableUpdates") != b"1")
|
||||
community_feature_toggle = params.get("CommunityFeaturesToggle", encoding='utf8') == "1"
|
||||
openpilot_enabled_toggle = params.get("OpenpilotEnabledToggle", encoding='utf8') == "1"
|
||||
passive = params.get("Passive", encoding='utf8') == "1" or \
|
||||
|
|
|
@ -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…
Reference in New Issue