* updates for agnos 0.6

* timezone

* bump version
pull/20114/head
Adeeb Shihadeh 2021-02-18 18:14:34 -08:00 committed by GitHub
parent a0cdacbb2a
commit d169914674
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 20 deletions

View File

@ -58,6 +58,7 @@ keys = {
b"ReleaseNotes": [TxType.PERSISTENT],
b"ShouldDoUpdate": [TxType.CLEAR_ON_MANAGER_START],
b"SubscriberInfo": [TxType.PERSISTENT],
b"SshEnabled": [TxType.PERSISTENT],
b"TermsVersion": [TxType.PERSISTENT],
b"Timezone": [TxType.PERSISTENT],
b"TrainingVersion": [TxType.PERSISTENT],

View File

@ -11,7 +11,7 @@ if [ -z "$REQUIRED_NEOS_VERSION" ]; then
fi
if [ -z "$AGNOS_VERSION" ]; then
export AGNOS_VERSION="0.5"
export AGNOS_VERSION="0.6"
fi
if [ -z "$PASSIVE" ]; then

View File

@ -1,18 +1,18 @@
[
{
"name": "system",
"url": "https://commadist.azureedge.net/agnosupdate-staging/system-c74abe031e98073efca757f07903ad356e4ccf583a8c54c643d060bafddcd874.img.xz",
"hash": "6313b8f6cfaecfe8d37bd1f25ff7781a2b312eac85db817bda08dd0268dc471b",
"hash_raw": "c74abe031e98073efca757f07903ad356e4ccf583a8c54c643d060bafddcd874",
"url": "https://commadist.azureedge.net/agnosupdate-staging/system-f6c3e2b5b26e070a0b99afb004c2d48bba27ab1b85a48fcf87b43ca302faf614.img.xz",
"hash": "d51aedd84defed389eede52d2fa871846cc8d639bbf69215e0fb38ba25a47e42",
"hash_raw": "f6c3e2b5b26e070a0b99afb004c2d48bba27ab1b85a48fcf87b43ca302faf614",
"size": 10737418240,
"sparse": true
},
{
"name": "boot",
"url": "https://commadist.azureedge.net/agnosupdate-staging/boot-cf067c059a5c037c17659c97ec897f4e79271be67b1c9e6a602207a5a9e6f8a5.img.xz",
"hash": "cf067c059a5c037c17659c97ec897f4e79271be67b1c9e6a602207a5a9e6f8a5",
"hash_raw": "cf067c059a5c037c17659c97ec897f4e79271be67b1c9e6a602207a5a9e6f8a5",
"size": 14673920,
"url": "https://commadist.azureedge.net/agnosupdate-staging/boot-d292aacf2f760e85c60c1a25adcecae9df2c80ee3f3240ea8592bbac369db038.img.xz",
"hash": "d292aacf2f760e85c60c1a25adcecae9df2c80ee3f3240ea8592bbac369db038",
"hash_raw": "d292aacf2f760e85c60c1a25adcecae9df2c80ee3f3240ea8592bbac369db038",
"size": 14768128,
"sparse": false
}
]

View File

@ -1,12 +1,14 @@
#!/usr/bin/env python3
import time
import json
import os
import time
import subprocess
import requests
from timezonefinder import TimezoneFinder
from common.params import Params
from selfdrive.hardware import TICI
from selfdrive.swaglog import cloudlog
@ -17,7 +19,13 @@ def set_timezone(valid_timezones, timezone):
cloudlog.info(f"Setting timezone to {timezone}")
try:
subprocess.check_call(f'sudo timedatectl set-timezone {timezone}', shell=True)
if TICI:
tzpath = os.path.join("/usr/share/zoneinfo/", timezone)
os.symlink(tzpath, "/data/etc/localtime")
with open("/data/etc/timezone", "w") as f:
f.write(timezone)
else:
subprocess.check_call(f'sudo timedatectl set-timezone {timezone}', shell=True)
except subprocess.CalledProcessError:
cloudlog.exception(f"Error setting timezone to {timezone}")

View File

@ -7,6 +7,7 @@
#include <QRandomGenerator>
#include <QtConcurrent>
#include "common/params.h"
#include "networking.hpp"
#include "util.h"
@ -280,14 +281,12 @@ void AdvancedNetworking::toggleTethering(int enable) {
}
void enableSSH(Toggle* toggle_switch_SSH){
system("sudo systemctl enable ssh");
system("sudo systemctl start ssh");
Params().write_db_value("SshEnabled", "1");
toggle_switch_SSH->setEnabled(true);
}
void disableSSH(Toggle* toggle_switch_SSH){
system("sudo systemctl stop ssh");
system("sudo systemctl disable ssh");
Params().write_db_value("SshEnabled", "0");
toggle_switch_SSH->setEnabled(true);
}

View File

@ -25,18 +25,16 @@ int fresh_clone() {
int err;
// Cleanup
err = std::system("rm -rf /tmp/openpilot /data/openpilot");
err = std::system("rm -rf /data/tmppilot /data/openpilot");
if (err) return 1;
// Clone
err = std::system("git clone " GIT_URL " -b " BRANCH " --depth=1 /tmp/openpilot");
err = std::system("git clone " GIT_URL " -b " BRANCH " --depth=1 --recurse-submodules /data/tmppilot");
if (err) return 1;
err = std::system("cd /tmp/openpilot && git submodule update --init");
if (err) return 1;
err = std::system("cd /tmp/openpilot && git remote set-url origin --push " GIT_SSH_URL);
err = std::system("cd /data/tmppilot && git remote set-url origin --push " GIT_SSH_URL);
if (err) return 1;
err = std::system("mv /tmp/openpilot /data");
err = std::system("mv /data/tmppilot /data/openpilot");
if (err) return 1;
#ifdef SSH_KEYS