bluerobotics / bluerobotics/BlueOS

core: Warn users and prevent undesirable kernel upgrade

Open
#2,234 0 comments 0 reactions 0 assignees View on GitHub
core enhancement triage ui
Dominant language
Vue
Stars
453
Forks
151
Avg merge
1d 3h
Merged PRs (30d)
174

Description

### Current behaviour

Users actually are upgrading the Raspberry's kernel and losing some compatibility and functions.
It happens after 'sudo apt-get upgrade'.

An alias could be implemented to warn users.

### Expected or desired behaviour

A possible solution is:
./.bashrc have the command:
```
sudo() {
if [[ $1 == "apt-get" && $2 == "upgrade" ]]; then
if [[ $3 != "--walk-the-plank" ]]; then
echo "WARNING: 'sudo apt-get upgrade' not allowed without --walk-the-plank"
return 1
else
command sudo apt-get upgrade
fi
else
command sudo "$@"
fi
}
```
That will works like shown:
![image](https://github.com/bluerobotics/BlueOS/assets/80598030/c891b321-c778-4f83-a608-26358694c32a)

It needs to be implemented on:
install/install.sh
core/tools/blueos_startup_update/blueos_startup_update

### Prerequisites

- [X] I have checked to make sure that a similar request has not already been filed or fixed.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.