Skip to content

Commit 9a69775

Browse files
NO_UPSTREAM: update ping and driver services to use userdata for settings
1 parent 9583c24 commit 9a69775

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

core/services/bridget/bridget.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
from pathlib import Path
23
from typing import Dict, List
34

45
import requests
@@ -44,7 +45,7 @@ class Bridget:
4445

4546
def __init__(self) -> None:
4647
self._bridges: Dict[BridgeFrontendSpec, Bridge] = {}
47-
self._settings_manager = Manager("bridget", SettingsV2)
48+
self._settings_manager = Manager("bridget", SettingsV2, Path("/usr/blueos/userdata/bridget/"))
4849
self._settings_manager.load()
4950
for bridge_settings_spec in self._settings_manager.settings.specsv2:
5051
try:

core/services/ping/ping1d_driver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import asyncio
2+
from pathlib import Path
23

34
from bridges.bridges import Bridge
45
from commonwealth.settings.manager import Manager
@@ -16,7 +17,7 @@ class Ping1DDriver(PingDriver):
1617
def __init__(self, ping: PingDeviceDescriptor, port: int) -> None:
1718
super().__init__(ping, port)
1819
# load settings
19-
self.manager = Manager(SERVICE_NAME, SettingsV1)
20+
self.manager = Manager(SERVICE_NAME, SettingsV1, Path("/usr/blueos/userdata/ping/"))
2021
# our settings file is a list for each sensor type.
2122
# check the list to find our current sensor in it
2223
connection_info = self.ping.get_hw_or_eth_info()

core/start-blueos-core

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ fi
8181

8282
# fix permissions for logging folders:
8383
find /var/logs/blueos -type d -exec chmod 777 {} \;
84+
mkdir -p /usr/blueos/userdata/
85+
find /usr/blueos -type d -exec chmod 777 {} \;
86+
ln -s /root/.config /home/blueos/.config || true;
8487

8588
# These services have priority because they do the fundamental for the vehicle to work,
8689
# and by initializing them first we reduce the time users have to wait to control the vehicle.

0 commit comments

Comments
 (0)