-
Notifications
You must be signed in to change notification settings - Fork 111
Labels
P1 - Important PriorityHigh priority taskHigh priority taskcoreIssue related to BlueOS-coreIssue related to BlueOS-coregood first issueGood for newcomersGood for newcomersmove-to-stableNeeds to be cherry-picked and move to stableNeeds to be cherry-picked and move to stable
Description
All BlueOS services follow the pattern of saving their config at /root/.config/blueos/<service-name>/.
, except for Bridget, which does it at /usr/blueos/userdata/settings/bridget/bridget/settings-2.json
.
A quick verification of all settings files in BlueOS (sudo find / -type f -name "*settings*.json*" | less
) shows that Bridget is the only service not following the pattern.
The impacts need to be further verified, but possibly:
- BlueOS "reset settings" functionality not reaching Bridget
- Cloud Backup could be missing Bridget's configs
The mitigations could be:
- Define a new location service:
/root/.config/blueos/bridget/.
- Patch BlueOS to (1) move the current settings folder to the location, and (2) symlink the old location to the new location.
A low-effort initial draft just to be clear about it:
#!/bin/bash
OLD_DIR="/usr/blueos/userdata/settings/bridget/bridget"
NEW_DIR="/root/.config/blueos/bridget"
# Note:
# 1. We should only move OLD_DIR to NEW_DIR if:
# - NEW_DIR doesn't exist
# - OLD_DIR exists
# - OLD_DIR is not a symbolic link
# 2. We must symlink OLD_DIR to NEW_DIR to keep backward compatibility when:
# - OLD_DIR is not a symlink to NEW_DIR
mv "$OLD_DIR" "$NEW_DIR"
ln -s "$NEW_DIR" "$OLD_DIR"
Note: Migration should happen before the service initialization
Note: Remember to check if the folder/files' permissions/owner are correct after moving the folder.
Metadata
Metadata
Assignees
Labels
P1 - Important PriorityHigh priority taskHigh priority taskcoreIssue related to BlueOS-coreIssue related to BlueOS-coregood first issueGood for newcomersGood for newcomersmove-to-stableNeeds to be cherry-picked and move to stableNeeds to be cherry-picked and move to stable