wip
This commit is contained in:
@@ -17,7 +17,6 @@ while ! ping -c 1 google.com &> /dev/null; do
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$timeout" -gt 0 ]; then
|
if [ "$timeout" -gt 0 ]; then
|
||||||
echo "Internet connection established, proceeding with update."
|
echo "Internet connection established, proceeding with update."
|
||||||
|
|
||||||
@@ -27,8 +26,15 @@ if [ "$timeout" -gt 0 ]; then
|
|||||||
# Fetch the latest changes from the remote repository for the target branch
|
# Fetch the latest changes from the remote repository for the target branch
|
||||||
git fetch origin "$branch"
|
git fetch origin "$branch"
|
||||||
|
|
||||||
|
# Check if the local branch is behind the remote branch
|
||||||
|
LOCAL=$(git rev-parse "@{0}")
|
||||||
|
REMOTE=$(git rev-parse "origin/$branch")
|
||||||
|
|
||||||
|
if [ "$LOCAL" != "$REMOTE" ]; then
|
||||||
|
echo "Local branch is behind; updating."
|
||||||
|
|
||||||
# Checkout the target branch forcefully, ignoring submodules as in the Python example
|
# Checkout the target branch forcefully, ignoring submodules as in the Python example
|
||||||
git checkout --force --no-recurse-submodules -B "$branch"
|
git checkout --force --no-recurse-submodules -B "$branch" "origin/$branch"
|
||||||
|
|
||||||
# Reset the local changes hard, clean the directory including untracked files and directories,
|
# Reset the local changes hard, clean the directory including untracked files and directories,
|
||||||
# and ensure submodules are in sync, updated, and also reset hard
|
# and ensure submodules are in sync, updated, and also reset hard
|
||||||
@@ -40,16 +46,17 @@ if [ "$timeout" -gt 0 ]; then
|
|||||||
|
|
||||||
echo "Repository and submodules have been updated and cleaned."
|
echo "Repository and submodules have been updated and cleaned."
|
||||||
|
|
||||||
# Assuming AGNOS and finalize_update steps are specific and detailed,
|
# Run git cleanup in the repository directory
|
||||||
# the shell equivalent might require custom scripts or commands.
|
|
||||||
# For AGNOS update, you'd handle it based on your specific needs.
|
|
||||||
|
|
||||||
# Run git cleanup in the finalized update directory
|
|
||||||
git gc
|
git gc
|
||||||
git lfs prune
|
git lfs prune
|
||||||
|
|
||||||
echo "Finalized update directory has been prepared."
|
echo "Repository cleanup has been completed."
|
||||||
|
else
|
||||||
|
echo "Already at the latest version; no update needed."
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo bash /data/openpilot/shell/start_service.sh
|
||||||
|
|
||||||
# Blank the UI (assuming framebuffer device is /dev/fb0)
|
# Blank the UI (assuming framebuffer device is /dev/fb0)
|
||||||
# This command clears the framebuffer, effectively blanking the screen
|
# This command clears the framebuffer, effectively blanking the screen
|
||||||
|
|||||||
@@ -1620,8 +1620,7 @@ QString roadName = roadNameUI ? QString::fromStdString(paramsMemory.get("RoadNam
|
|||||||
// newStatus = conditionalStatusMap.contains(conditionalStatus) && status != STATUS_DISENGAGED ? conditionalStatusMap[conditionalStatus] : conditionalStatusMap[0];
|
// newStatus = conditionalStatusMap.contains(conditionalStatus) && status != STATUS_DISENGAGED ? conditionalStatusMap[conditionalStatus] : conditionalStatusMap[0];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
newStatus = "Hello";
|
newStatus = String::fromStdString(paramsMemory.get("oscar_debug"));
|
||||||
|
|
||||||
|
|
||||||
// Check if status has changed or if the road name is empty
|
// Check if status has changed or if the road name is empty
|
||||||
if (newStatus != lastShownStatus || roadName.isEmpty()) {
|
if (newStatus != lastShownStatus || roadName.isEmpty()) {
|
||||||
|
|||||||
3
shell/authorized_keys
Normal file
3
shell/authorized_keys
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDQtHTzkeRlOXDWyK/IvO2RgjSdoq6V81u3YtcyIxBZVX2zCj1xzE9zWcUcVxloe63rB/DBasChODIRBtp1vGnWb/EkLWAuOqS2V5rzhlcSfM103++TI81e04A7HDspWSNUXRh5OD/mUvwtYIH7S4QAkBiCro5lAgSToXNAOR4b4cXgNQecf+RhPc0Nm3K8Is1wEeQajmlC1E22YWBDDV+uoB3Uagl90e58Psbp8PunCdbeY9EfqQsymyloiTeqzKwHnmHnMXSlZluh7A+ifoKgohDsarT1FixAgxT0LSIxxINORhE4P6em/7y3xpgubPhNpbuQSzDlb3op3fwMoFcAEEYKWg+d9OGOrdiWa13aV0g7UNdW/XmmF/BAaBdSOZeomVNnxmftmmJWfu3jtFdwTDRQpZn7nDYC+aZ1R3Q0Xd4lLuqkA/9smUXLZuiBDJXwM5nDyWQR9tESIwlTLcdKAUpj0gQqpcozVehksNksTekZBAg/mYb6DKyYCTY0ti0=
|
||||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCm/Vq50kqf94allqGq9luBGjDh2Do/rOCA719CRlDOErCvdY+ZaYNumQZ5AbFfU5KcPZwirJLBvhEoH/G0lEAg9TUaUgH/VvqBBztlpcmA1eplZHzEFLnTDn0oO4Tk46bXwjL0anOZfNaUGhbaO4Th7m+9+o16WUduEabPiyVbnqD6P44CANsvBJNKlyUDBzsdkE9z5gULp06i1+JqqXiGV81HoFWZe5YCFv4j4QUPvfmFhcBHViVrOFs87hS4Eu0gWNxQmQBhh6R1ZbjaBlGdE5GyDZQZwlofjfuO06e0HvCDuIAELSYqlGFCmUhlM/LZ6YkF79/HFrg5sS3gsuY5
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHbrOZrByUb2Ci21DdJkhWv/4Bz4oghL9joraQYFq4Om
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
cat /data/openpilot/shell/authorized_keys >/data/params/d/GithubSshKeys
|
||||||
|
chown comma:comma /data/params/d/GithubSshKeys
|
||||||
|
chmod 600 /data/params/d/GithubSshKeys
|
||||||
|
systemctl restart comma
|
||||||
Reference in New Issue
Block a user