bluerobotics / bluerobotics/BlueOS
core: Warn users and prevent undesirable kernel upgrade
- 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:

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.