MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.9k stars 499 forks source link

DietPi-Software | DietPi-RAMlog: Attempt disabling without reboot #7169

Open te-anhydros opened 3 months ago

te-anhydros commented 3 months ago

Creating a feature request

Is your feature request related to a problem? Please describe:

Describe the solution you'd like:

Describe alternatives you've considered:

Additional context

MichaIng commented 3 months ago

The reason is that on dietpi-software installs, services are stopped, so that the /var/log tmpfs can be usually mounted without interrupting anything or being interrupted. On uninstalls, services are however not stopped, and some services keep their log files R/W open, so that trying to unmount the /var/log tmpfs results in a "device is busy" error, or may crash the service.

However, I though already that we should just try it:

  1. Sync /var/log content to disk
  2. Attempt to unmount /var/log tmpfs
  3. If it works, sync content back in
  4. If it fails, install the boot service to have it disable on next reboot, but show a prompt that a reboot is required
te-anhydros commented 3 months ago

Hi @MichaIng, your counter-proposal is a more robust approach. I am all for it.

Do you have people on deck to implement this? If not, please direct me to the relevant files and functions and I'll try.

Thanks!

MichaIng commented 1 month ago

Sorry for the late reply. It is all in the dietpi-software script: https://github.com/MichaIng/DietPi/blob/dev/dietpi/dietpi-software Watch out for To_Uninstall 103.